You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (197 commits) sh: add spi header and r2d platform data V3 sh: update r7780rp interrupt code sh: remove consistent alloc stuff from the machine vector sh: use declared coherent memory for dreamcast pci ethernet adapter sh: declared coherent memory support V2 sh: Add support for SDK7780 board. sh: constify function pointer tables sh: Kill off -traditional for linker script. cdrom: Add support for Sega Dreamcast GD-ROM. sh: Kill off hs7751rvoip reference from arch/sh/Kconfig. sh: Drop r7780rp_defconfig, use r7780mp_defconfig as kbuild default. sh: Kill off dead HS771RVoIP board support. sh: r7785rp: Fix up DECLARE_INTC_DESC() arg mismatch. sh: r7785rp: Hook up the rest of the HL7785 FPGA IRQ vectors. sh: r2d - enable sm501 usb host function sh: remove voyagergx sh: r2d - add lcd planel timings to sm501 platform data sh: Add OHCI and UDC platform devices for SH7720. sh: intc - remove default interrupt priority tables sh: Correct pte size mismatch for X2 TLB. ...
This commit is contained in:
@@ -169,7 +169,7 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
|
|||||||
-e s/arm.*/arm/ -e s/sa110/arm/ \
|
-e s/arm.*/arm/ -e s/sa110/arm/ \
|
||||||
-e s/s390x/s390/ -e s/parisc64/parisc/ \
|
-e s/s390x/s390/ -e s/parisc64/parisc/ \
|
||||||
-e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
|
-e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
|
||||||
-e s/sh[234].*/sh/ )
|
-e s/sh.*/sh/ )
|
||||||
|
|
||||||
# Cross compiling and selecting different set of gcc/bin-utils
|
# Cross compiling and selecting different set of gcc/bin-utils
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|||||||
+274
-138
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,115 @@
|
|||||||
|
menu "Processor features"
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "Endianess selection"
|
||||||
|
default CPU_LITTLE_ENDIAN
|
||||||
|
help
|
||||||
|
Some SuperH machines can be configured for either little or big
|
||||||
|
endian byte order. These modes require different kernels.
|
||||||
|
|
||||||
|
config CPU_LITTLE_ENDIAN
|
||||||
|
bool "Little Endian"
|
||||||
|
|
||||||
|
config CPU_BIG_ENDIAN
|
||||||
|
bool "Big Endian"
|
||||||
|
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
config SH_FPU
|
||||||
|
def_bool y
|
||||||
|
prompt "FPU support"
|
||||||
|
depends on CPU_HAS_FPU
|
||||||
|
help
|
||||||
|
Selecting this option will enable support for SH processors that
|
||||||
|
have FPU units (ie, SH77xx).
|
||||||
|
|
||||||
|
This option must be set in order to enable the FPU.
|
||||||
|
|
||||||
|
config SH64_FPU_DENORM_FLUSH
|
||||||
|
bool "Flush floating point denorms to zero"
|
||||||
|
depends on SH_FPU && SUPERH64
|
||||||
|
|
||||||
|
config SH_FPU_EMU
|
||||||
|
def_bool n
|
||||||
|
prompt "FPU emulation support"
|
||||||
|
depends on !SH_FPU && EXPERIMENTAL
|
||||||
|
help
|
||||||
|
Selecting this option will enable support for software FPU emulation.
|
||||||
|
Most SH-3 users will want to say Y here, whereas most SH-4 users will
|
||||||
|
want to say N.
|
||||||
|
|
||||||
|
config SH_DSP
|
||||||
|
def_bool y
|
||||||
|
prompt "DSP support"
|
||||||
|
depends on CPU_HAS_DSP
|
||||||
|
help
|
||||||
|
Selecting this option will enable support for SH processors that
|
||||||
|
have DSP units (ie, SH2-DSP, SH3-DSP, and SH4AL-DSP).
|
||||||
|
|
||||||
|
This option must be set in order to enable the DSP.
|
||||||
|
|
||||||
|
config SH_ADC
|
||||||
|
def_bool y
|
||||||
|
prompt "ADC support"
|
||||||
|
depends on CPU_SH3
|
||||||
|
help
|
||||||
|
Selecting this option will allow the Linux kernel to use SH3 on-chip
|
||||||
|
ADC module.
|
||||||
|
|
||||||
|
If unsure, say N.
|
||||||
|
|
||||||
|
config SH_STORE_QUEUES
|
||||||
|
bool "Support for Store Queues"
|
||||||
|
depends on CPU_SH4
|
||||||
|
help
|
||||||
|
Selecting this option will enable an in-kernel API for manipulating
|
||||||
|
the store queues integrated in the SH-4 processors.
|
||||||
|
|
||||||
|
config SPECULATIVE_EXECUTION
|
||||||
|
bool "Speculative subroutine return"
|
||||||
|
depends on CPU_SUBTYPE_SH7780 && EXPERIMENTAL
|
||||||
|
help
|
||||||
|
This enables support for a speculative instruction fetch for
|
||||||
|
subroutine return. There are various pitfalls associated with
|
||||||
|
this, as outlined in the SH7780 hardware manual.
|
||||||
|
|
||||||
|
If unsure, say N.
|
||||||
|
|
||||||
|
config SH64_USER_MISALIGNED_FIXUP
|
||||||
|
def_bool y
|
||||||
|
prompt "Fixup misaligned loads/stores occurring in user mode"
|
||||||
|
depends on SUPERH64
|
||||||
|
|
||||||
|
config SH64_ID2815_WORKAROUND
|
||||||
|
bool "Include workaround for SH5-101 cut2 silicon defect ID2815"
|
||||||
|
depends on CPU_SUBTYPE_SH5_101
|
||||||
|
|
||||||
|
config CPU_HAS_INTEVT
|
||||||
|
bool
|
||||||
|
|
||||||
|
config CPU_HAS_MASKREG_IRQ
|
||||||
|
bool
|
||||||
|
|
||||||
|
config CPU_HAS_IPR_IRQ
|
||||||
|
bool
|
||||||
|
|
||||||
|
config CPU_HAS_SR_RB
|
||||||
|
bool
|
||||||
|
help
|
||||||
|
This will enable the use of SR.RB register bank usage. Processors
|
||||||
|
that are lacking this bit must have another method in place for
|
||||||
|
accomplishing what is taken care of by the banked registers.
|
||||||
|
|
||||||
|
See <file:Documentation/sh/register-banks.txt> for further
|
||||||
|
information on SR.RB and register banking in the kernel in general.
|
||||||
|
|
||||||
|
config CPU_HAS_PTEA
|
||||||
|
bool
|
||||||
|
|
||||||
|
config CPU_HAS_DSP
|
||||||
|
bool
|
||||||
|
|
||||||
|
config CPU_HAS_FPU
|
||||||
|
bool
|
||||||
|
|
||||||
|
endmenu
|
||||||
+38
-13
@@ -1,8 +1,7 @@
|
|||||||
menu "Kernel hacking"
|
menu "Kernel hacking"
|
||||||
|
|
||||||
config TRACE_IRQFLAGS_SUPPORT
|
config TRACE_IRQFLAGS_SUPPORT
|
||||||
bool
|
def_bool y
|
||||||
default y
|
|
||||||
|
|
||||||
source "lib/Kconfig.debug"
|
source "lib/Kconfig.debug"
|
||||||
|
|
||||||
@@ -30,12 +29,13 @@ config EARLY_SCIF_CONSOLE
|
|||||||
config EARLY_SCIF_CONSOLE_PORT
|
config EARLY_SCIF_CONSOLE_PORT
|
||||||
hex
|
hex
|
||||||
depends on EARLY_SCIF_CONSOLE
|
depends on EARLY_SCIF_CONSOLE
|
||||||
default "0xffe00000" if CPU_SUBTYPE_SH7780
|
default "0xffe00000" if CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7763
|
||||||
default "0xffea0000" if CPU_SUBTYPE_SH7785
|
default "0xffea0000" if CPU_SUBTYPE_SH7785
|
||||||
default "0xfffe9800" if CPU_SUBTYPE_SH7206
|
default "0xfffe8000" if CPU_SUBTYPE_SH7203
|
||||||
|
default "0xfffe9800" if CPU_SUBTYPE_SH7206 || CPU_SUBTYPE_SH7263
|
||||||
default "0xf8420000" if CPU_SUBTYPE_SH7619
|
default "0xf8420000" if CPU_SUBTYPE_SH7619
|
||||||
default "0xa4400000" if CPU_SUBTYPE_SH7712 || CPU_SUBTYPE_SH7705
|
default "0xa4400000" if CPU_SUBTYPE_SH7712 || CPU_SUBTYPE_SH7705
|
||||||
default "0xa4430000" if CPU_SUBTYPE_SH7720
|
default "0xa4430000" if CPU_SUBTYPE_SH7720 || CPU_SUBTYPE_SH7721
|
||||||
default "0xffc30000" if CPU_SUBTYPE_SHX3
|
default "0xffc30000" if CPU_SUBTYPE_SHX3
|
||||||
default "0xffe80000" if CPU_SH4
|
default "0xffe80000" if CPU_SH4
|
||||||
default "0x00000000"
|
default "0x00000000"
|
||||||
@@ -62,7 +62,7 @@ config DEBUG_BOOTMEM
|
|||||||
|
|
||||||
config DEBUG_STACKOVERFLOW
|
config DEBUG_STACKOVERFLOW
|
||||||
bool "Check for stack overflows"
|
bool "Check for stack overflows"
|
||||||
depends on DEBUG_KERNEL
|
depends on DEBUG_KERNEL && SUPERH32
|
||||||
help
|
help
|
||||||
This option will cause messages to be printed if free stack space
|
This option will cause messages to be printed if free stack space
|
||||||
drops below a certain limit.
|
drops below a certain limit.
|
||||||
@@ -88,7 +88,7 @@ config 4KSTACKS
|
|||||||
|
|
||||||
config IRQSTACKS
|
config IRQSTACKS
|
||||||
bool "Use separate kernel stacks when processing interrupts"
|
bool "Use separate kernel stacks when processing interrupts"
|
||||||
depends on DEBUG_KERNEL
|
depends on DEBUG_KERNEL && SUPERH32
|
||||||
help
|
help
|
||||||
If you say Y here the kernel will use separate kernel stacks
|
If you say Y here the kernel will use separate kernel stacks
|
||||||
for handling hard and soft interrupts. This can help avoid
|
for handling hard and soft interrupts. This can help avoid
|
||||||
@@ -119,19 +119,19 @@ config COMPILE_OPTIONS
|
|||||||
depends on MORE_COMPILE_OPTIONS
|
depends on MORE_COMPILE_OPTIONS
|
||||||
|
|
||||||
config KGDB_NMI
|
config KGDB_NMI
|
||||||
bool "Enter KGDB on NMI"
|
def_bool n
|
||||||
default n
|
prompt "Enter KGDB on NMI"
|
||||||
|
|
||||||
config SH_KGDB_CONSOLE
|
config SH_KGDB_CONSOLE
|
||||||
bool "Console messages through GDB"
|
def_bool n
|
||||||
|
prompt "Console messages through GDB"
|
||||||
depends on !SERIAL_SH_SCI_CONSOLE && SERIAL_SH_SCI=y
|
depends on !SERIAL_SH_SCI_CONSOLE && SERIAL_SH_SCI=y
|
||||||
select SERIAL_CORE_CONSOLE
|
select SERIAL_CORE_CONSOLE
|
||||||
default n
|
|
||||||
|
|
||||||
config KGDB_SYSRQ
|
config KGDB_SYSRQ
|
||||||
bool "Allow SysRq 'G' to enter KGDB"
|
def_bool y
|
||||||
|
prompt "Allow SysRq 'G' to enter KGDB"
|
||||||
depends on MAGIC_SYSRQ
|
depends on MAGIC_SYSRQ
|
||||||
default y
|
|
||||||
|
|
||||||
comment "Serial port setup"
|
comment "Serial port setup"
|
||||||
|
|
||||||
@@ -174,4 +174,29 @@ endchoice
|
|||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
|
if SUPERH64
|
||||||
|
|
||||||
|
config SH64_PROC_ASIDS
|
||||||
|
bool "Debug: report ASIDs through /proc/asids"
|
||||||
|
depends on PROC_FS
|
||||||
|
|
||||||
|
config SH64_SR_WATCH
|
||||||
|
bool "Debug: set SR.WATCH to enable hardware watchpoints and trace"
|
||||||
|
|
||||||
|
config POOR_MANS_STRACE
|
||||||
|
bool "Debug: enable rudimentary strace facility"
|
||||||
|
help
|
||||||
|
This option allows system calls to be traced to the console. It also
|
||||||
|
aids in detecting kernel stack underflow. It is useful for debugging
|
||||||
|
early-userland problems (e.g. init incurring fatal exceptions.)
|
||||||
|
|
||||||
|
config SH_ALPHANUMERIC
|
||||||
|
bool "Enable debug outputs to on-board alphanumeric display"
|
||||||
|
depends on SH_CAYMAN
|
||||||
|
|
||||||
|
config SH_NO_BSS_INIT
|
||||||
|
bool "Avoid zeroing BSS (to speed-up startup on suitable platforms)"
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|||||||
+68
-35
@@ -1,17 +1,13 @@
|
|||||||
# $Id: Makefile,v 1.35 2004/04/15 03:39:20 sugioka Exp $
|
|
||||||
#
|
#
|
||||||
# This file is subject to the terms and conditions of the GNU General Public
|
# arch/sh/Makefile
|
||||||
# License. See the file "COPYING" in the main directory of this archive
|
|
||||||
# for more details.
|
|
||||||
#
|
#
|
||||||
# Copyright (C) 1999 Kaz Kojima
|
# Copyright (C) 1999 Kaz Kojima
|
||||||
# Copyright (C) 2002, 2003, 2004 Paul Mundt
|
# Copyright (C) 2002, 2003, 2004 Paul Mundt
|
||||||
# Copyright (C) 2002 M. R. Brown
|
# Copyright (C) 2002 M. R. Brown
|
||||||
#
|
#
|
||||||
# This file is included by the global makefile so that you can add your own
|
# This file is subject to the terms and conditions of the GNU General Public
|
||||||
# architecture-specific flags and dependencies. Remember to do have actions
|
# License. See the file "COPYING" in the main directory of this archive
|
||||||
# for "archclean" and "archdep" for cleaning up and making dependencies for
|
# for more details.
|
||||||
# this architecture
|
|
||||||
#
|
#
|
||||||
isa-y := any
|
isa-y := any
|
||||||
isa-$(CONFIG_SH_DSP) := sh
|
isa-$(CONFIG_SH_DSP) := sh
|
||||||
@@ -21,13 +17,9 @@ isa-$(CONFIG_CPU_SH3) := sh3
|
|||||||
isa-$(CONFIG_CPU_SH4) := sh4
|
isa-$(CONFIG_CPU_SH4) := sh4
|
||||||
isa-$(CONFIG_CPU_SH4A) := sh4a
|
isa-$(CONFIG_CPU_SH4A) := sh4a
|
||||||
isa-$(CONFIG_CPU_SH4AL_DSP) := sh4al
|
isa-$(CONFIG_CPU_SH4AL_DSP) := sh4al
|
||||||
|
isa-$(CONFIG_CPU_SH5) := shmedia
|
||||||
isa-$(CONFIG_SH_DSP) := $(isa-y)-dsp
|
isa-$(CONFIG_SH_DSP) := $(isa-y)-dsp
|
||||||
|
|
||||||
ifndef CONFIG_MMU
|
|
||||||
isa-y := $(isa-y)-nommu
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifndef CONFIG_SH_DSP
|
ifndef CONFIG_SH_DSP
|
||||||
ifndef CONFIG_SH_FPU
|
ifndef CONFIG_SH_FPU
|
||||||
isa-y := $(isa-y)-nofpu
|
isa-y := $(isa-y)-nofpu
|
||||||
@@ -44,6 +36,7 @@ cflags-$(CONFIG_CPU_SH4) := $(call cc-option,-m4,) \
|
|||||||
$(call cc-option,-mno-implicit-fp,-m4-nofpu)
|
$(call cc-option,-mno-implicit-fp,-m4-nofpu)
|
||||||
cflags-$(CONFIG_CPU_SH4A) += $(call cc-option,-m4a,) \
|
cflags-$(CONFIG_CPU_SH4A) += $(call cc-option,-m4a,) \
|
||||||
$(call cc-option,-m4a-nofpu,)
|
$(call cc-option,-m4a-nofpu,)
|
||||||
|
cflags-$(CONFIG_CPU_SH5) := $(call cc-option,-m5-32media-nofpu,)
|
||||||
|
|
||||||
cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb
|
cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb
|
||||||
cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -ml
|
cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -ml
|
||||||
@@ -66,22 +59,27 @@ cflags-y += $(isaflags-y) -ffreestanding
|
|||||||
cflags-$(CONFIG_MORE_COMPILE_OPTIONS) += \
|
cflags-$(CONFIG_MORE_COMPILE_OPTIONS) += \
|
||||||
$(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g')
|
$(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g')
|
||||||
|
|
||||||
OBJCOPYFLAGS := -O binary -R .note -R .note.gnu.build-id -R .comment -R .stab -R .stabstr -S
|
OBJCOPYFLAGS := -O binary -R .note -R .note.gnu.build-id -R .comment \
|
||||||
|
-R .stab -R .stabstr -S
|
||||||
|
|
||||||
#
|
# Give the various platforms the opportunity to set default image types
|
||||||
# arch/sh/defconfig doesn't reflect any real hardware, and as such should
|
defaultimage-$(CONFIG_SUPERH32) := zImage
|
||||||
# never be used by anyone. Use a board-specific defconfig that has a
|
|
||||||
# reasonable chance of being current instead.
|
|
||||||
#
|
|
||||||
KBUILD_DEFCONFIG := r7780rp_defconfig
|
|
||||||
|
|
||||||
KBUILD_IMAGE := arch/sh/boot/zImage
|
# Set some sensible Kbuild defaults
|
||||||
|
KBUILD_DEFCONFIG := r7780mp_defconfig
|
||||||
|
KBUILD_IMAGE := $(defaultimage-y)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Choosing incompatible machines durings configuration will result in
|
# Choosing incompatible machines durings configuration will result in
|
||||||
# error messages during linking.
|
# error messages during linking.
|
||||||
#
|
#
|
||||||
LDFLAGS_vmlinux += -e _stext
|
ifdef CONFIG_SUPERH32
|
||||||
|
LDFLAGS_vmlinux += -e _stext
|
||||||
|
else
|
||||||
|
LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_PAGE_OFFSET) \
|
||||||
|
--defsym phys_stext_shmedia=phys_stext+1 \
|
||||||
|
-e phys_stext_shmedia
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_CPU_LITTLE_ENDIAN
|
ifdef CONFIG_CPU_LITTLE_ENDIAN
|
||||||
LDFLAGS_vmlinux += --defsym 'jiffies=jiffies_64'
|
LDFLAGS_vmlinux += --defsym 'jiffies=jiffies_64'
|
||||||
@@ -94,7 +92,9 @@ endif
|
|||||||
KBUILD_CFLAGS += -pipe $(cflags-y)
|
KBUILD_CFLAGS += -pipe $(cflags-y)
|
||||||
KBUILD_AFLAGS += $(cflags-y)
|
KBUILD_AFLAGS += $(cflags-y)
|
||||||
|
|
||||||
head-y := arch/sh/kernel/head.o arch/sh/kernel/init_task.o
|
head-y := arch/sh/kernel/init_task.o
|
||||||
|
head-$(CONFIG_SUPERH32) += arch/sh/kernel/head_32.o
|
||||||
|
head-$(CONFIG_SUPERH64) += arch/sh/kernel/head_64.o
|
||||||
|
|
||||||
LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
|
LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
|
||||||
|
|
||||||
@@ -112,11 +112,11 @@ machdir-$(CONFIG_SH_DREAMCAST) += dreamcast
|
|||||||
machdir-$(CONFIG_SH_MPC1211) += mpc1211
|
machdir-$(CONFIG_SH_MPC1211) += mpc1211
|
||||||
machdir-$(CONFIG_SH_SH03) += sh03
|
machdir-$(CONFIG_SH_SH03) += sh03
|
||||||
machdir-$(CONFIG_SH_SECUREEDGE5410) += snapgear
|
machdir-$(CONFIG_SH_SECUREEDGE5410) += snapgear
|
||||||
machdir-$(CONFIG_SH_HS7751RVOIP) += renesas/hs7751rvoip
|
|
||||||
machdir-$(CONFIG_SH_RTS7751R2D) += renesas/rts7751r2d
|
machdir-$(CONFIG_SH_RTS7751R2D) += renesas/rts7751r2d
|
||||||
machdir-$(CONFIG_SH_7751_SYSTEMH) += renesas/systemh
|
machdir-$(CONFIG_SH_7751_SYSTEMH) += renesas/systemh
|
||||||
machdir-$(CONFIG_SH_EDOSK7705) += renesas/edosk7705
|
machdir-$(CONFIG_SH_EDOSK7705) += renesas/edosk7705
|
||||||
machdir-$(CONFIG_SH_HIGHLANDER) += renesas/r7780rp
|
machdir-$(CONFIG_SH_HIGHLANDER) += renesas/r7780rp
|
||||||
|
machdir-$(CONFIG_SH_SDK7780) += renesas/sdk7780
|
||||||
machdir-$(CONFIG_SH_7710VOIPGW) += renesas/sh7710voipgw
|
machdir-$(CONFIG_SH_7710VOIPGW) += renesas/sh7710voipgw
|
||||||
machdir-$(CONFIG_SH_X3PROTO) += renesas/x3proto
|
machdir-$(CONFIG_SH_X3PROTO) += renesas/x3proto
|
||||||
machdir-$(CONFIG_SH_SH4202_MICRODEV) += superh/microdev
|
machdir-$(CONFIG_SH_SH4202_MICRODEV) += superh/microdev
|
||||||
@@ -127,6 +127,7 @@ machdir-$(CONFIG_SH_7206_SOLUTION_ENGINE) += se/7206
|
|||||||
machdir-$(CONFIG_SH_7619_SOLUTION_ENGINE) += se/7619
|
machdir-$(CONFIG_SH_7619_SOLUTION_ENGINE) += se/7619
|
||||||
machdir-$(CONFIG_SH_LBOX_RE2) += lboxre2
|
machdir-$(CONFIG_SH_LBOX_RE2) += lboxre2
|
||||||
machdir-$(CONFIG_SH_MAGIC_PANEL_R2) += magicpanelr2
|
machdir-$(CONFIG_SH_MAGIC_PANEL_R2) += magicpanelr2
|
||||||
|
machdir-$(CONFIG_SH_CAYMAN) += cayman
|
||||||
|
|
||||||
incdir-y := $(notdir $(machdir-y))
|
incdir-y := $(notdir $(machdir-y))
|
||||||
|
|
||||||
@@ -137,22 +138,22 @@ endif
|
|||||||
|
|
||||||
# Companion chips
|
# Companion chips
|
||||||
core-$(CONFIG_HD6446X_SERIES) += arch/sh/cchips/hd6446x/
|
core-$(CONFIG_HD6446X_SERIES) += arch/sh/cchips/hd6446x/
|
||||||
core-$(CONFIG_MFD_SM501) += arch/sh/cchips/voyagergx/
|
|
||||||
|
|
||||||
cpuincdir-$(CONFIG_CPU_SH2) := cpu-sh2
|
cpuincdir-$(CONFIG_CPU_SH2) := cpu-sh2
|
||||||
cpuincdir-$(CONFIG_CPU_SH2A) := cpu-sh2a
|
cpuincdir-$(CONFIG_CPU_SH2A) := cpu-sh2a
|
||||||
cpuincdir-$(CONFIG_CPU_SH3) := cpu-sh3
|
cpuincdir-$(CONFIG_CPU_SH3) := cpu-sh3
|
||||||
cpuincdir-$(CONFIG_CPU_SH4) := cpu-sh4
|
cpuincdir-$(CONFIG_CPU_SH4) := cpu-sh4
|
||||||
|
cpuincdir-$(CONFIG_CPU_SH5) := cpu-sh5
|
||||||
|
|
||||||
libs-y := arch/sh/lib/ $(libs-y) $(LIBGCC)
|
libs-$(CONFIG_SUPERH32) := arch/sh/lib/ $(libs-y)
|
||||||
|
libs-$(CONFIG_SUPERH64) := arch/sh/lib64/ $(libs-y)
|
||||||
|
libs-y += $(LIBGCC)
|
||||||
|
|
||||||
drivers-y += arch/sh/drivers/
|
drivers-y += arch/sh/drivers/
|
||||||
drivers-$(CONFIG_OPROFILE) += arch/sh/oprofile/
|
drivers-$(CONFIG_OPROFILE) += arch/sh/oprofile/
|
||||||
|
|
||||||
boot := arch/sh/boot
|
boot := arch/sh/boot
|
||||||
|
|
||||||
CPPFLAGS_vmlinux.lds := -traditional
|
|
||||||
|
|
||||||
incdir-prefix := $(srctree)/include/asm-sh/
|
incdir-prefix := $(srctree)/include/asm-sh/
|
||||||
|
|
||||||
# Update machine arch and proc symlinks if something which affects
|
# Update machine arch and proc symlinks if something which affects
|
||||||
@@ -196,29 +197,61 @@ include/asm-sh/.mach: $(wildcard include/config/sh/*.h) \
|
|||||||
done
|
done
|
||||||
@touch $@
|
@touch $@
|
||||||
|
|
||||||
archprepare: include/asm-sh/.cpu include/asm-sh/.mach maketools
|
|
||||||
|
|
||||||
PHONY += maketools FORCE
|
PHONY += maketools FORCE
|
||||||
|
|
||||||
maketools: include/linux/version.h FORCE
|
maketools: include/linux/version.h FORCE
|
||||||
$(Q)$(MAKE) $(build)=arch/sh/tools include/asm-sh/machtypes.h
|
$(Q)$(MAKE) $(build)=arch/sh/tools include/asm-sh/machtypes.h
|
||||||
|
|
||||||
all: zImage
|
all: $(KBUILD_IMAGE)
|
||||||
|
|
||||||
zImage uImage uImage.srec vmlinux.srec: vmlinux
|
zImage uImage uImage.srec vmlinux.srec: vmlinux
|
||||||
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
|
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
|
||||||
|
|
||||||
compressed: zImage
|
compressed: zImage
|
||||||
|
|
||||||
|
archprepare: include/asm-sh/.cpu include/asm-sh/.mach maketools \
|
||||||
|
arch/sh/lib64/syscalltab.h
|
||||||
|
|
||||||
archclean:
|
archclean:
|
||||||
$(Q)$(MAKE) $(clean)=$(boot)
|
$(Q)$(MAKE) $(clean)=$(boot)
|
||||||
|
|
||||||
CLEAN_FILES += include/asm-sh/machtypes.h \
|
|
||||||
include/asm-sh/cpu include/asm-sh/.cpu \
|
|
||||||
include/asm-sh/mach include/asm-sh/.mach
|
|
||||||
|
|
||||||
define archhelp
|
define archhelp
|
||||||
@echo '* zImage - Compressed kernel image'
|
@echo '* zImage - Compressed kernel image'
|
||||||
@echo ' vmlinux.srec - Create an ELF S-record'
|
@echo ' vmlinux.srec - Create an ELF S-record'
|
||||||
@echo ' uImage - Create a bootable image for U-Boot'
|
@echo ' uImage - Create a bootable image for U-Boot'
|
||||||
@echo ' uImage.srec - Create an S-record for U-Boot'
|
@echo ' uImage.srec - Create an S-record for U-Boot'
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define filechk_gen-syscalltab
|
||||||
|
(set -e; \
|
||||||
|
echo "/*"; \
|
||||||
|
echo " * DO NOT MODIFY."; \
|
||||||
|
echo " *"; \
|
||||||
|
echo " * This file was generated by arch/sh/Makefile"; \
|
||||||
|
echo " * Any changes will be reverted at build time."; \
|
||||||
|
echo " */"; \
|
||||||
|
echo ""; \
|
||||||
|
echo "#ifndef __SYSCALLTAB_H"; \
|
||||||
|
echo "#define __SYSCALLTAB_H"; \
|
||||||
|
echo ""; \
|
||||||
|
echo "#include <linux/kernel.h>"; \
|
||||||
|
echo ""; \
|
||||||
|
echo "struct syscall_info {"; \
|
||||||
|
echo " const char *name;"; \
|
||||||
|
echo "} syscall_info_table[] = {"; \
|
||||||
|
sed -e '/^.*\.long /!d;s// { "/;s/\(\([^/]*\)\/\)\{1\}.*/\2/; \
|
||||||
|
s/[ \t]*$$//g;s/$$/" },/;s/\("\)sys_/\1/g'; \
|
||||||
|
echo "};"; \
|
||||||
|
echo ""; \
|
||||||
|
echo "#define NUM_SYSCALL_INFO_ENTRIES ARRAY_SIZE(syscall_info_table)";\
|
||||||
|
echo ""; \
|
||||||
|
echo "#endif /* __SYSCALLTAB_H */" )
|
||||||
|
endef
|
||||||
|
|
||||||
|
arch/sh/lib64/syscalltab.h: arch/sh/kernel/syscalls_64.S
|
||||||
|
$(call filechk,gen-syscalltab)
|
||||||
|
|
||||||
|
CLEAN_FILES += arch/sh/lib64/syscalltab.h \
|
||||||
|
include/asm-sh/machtypes.h \
|
||||||
|
include/asm-sh/cpu include/asm-sh/.cpu \
|
||||||
|
include/asm-sh/mach include/asm-sh/.mach
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
#
|
||||||
|
# Makefile for the Hitachi Cayman specific parts of the kernel
|
||||||
|
#
|
||||||
|
obj-y := setup.o irq.o
|
||||||
|
obj-$(CONFIG_HEARTBEAT) += led.o
|
||||||
@@ -1,24 +1,26 @@
|
|||||||
/*
|
/*
|
||||||
* This file is subject to the terms and conditions of the GNU General Public
|
* arch/sh/mach-cayman/irq.c - SH-5 Cayman Interrupt Support
|
||||||
* License. See the file "COPYING" in the main directory of this archive
|
|
||||||
* for more details.
|
|
||||||
*
|
|
||||||
* arch/sh64/kernel/irq_cayman.c
|
|
||||||
*
|
|
||||||
* SH-5 Cayman Interrupt Support
|
|
||||||
*
|
*
|
||||||
* This file handles the board specific parts of the Cayman interrupt system
|
* This file handles the board specific parts of the Cayman interrupt system
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002 Stuart Menefy
|
* Copyright (C) 2002 Stuart Menefy
|
||||||
|
*
|
||||||
|
* 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 <linux/io.h>
|
||||||
#include <asm/irq.h>
|
|
||||||
#include <asm/page.h>
|
|
||||||
#include <asm/io.h>
|
|
||||||
#include <linux/irq.h>
|
#include <linux/irq.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/signal.h>
|
#include <linux/signal.h>
|
||||||
#include <asm/cayman.h>
|
#include <asm/cpu/irq.h>
|
||||||
|
#include <asm/page.h>
|
||||||
|
|
||||||
|
/* Setup for the SMSC FDC37C935 / LAN91C100FD */
|
||||||
|
#define SMSC_IRQ IRQ_IRL1
|
||||||
|
|
||||||
|
/* Setup for PCI Bus 2, which transmits interrupts via the EPLD */
|
||||||
|
#define PCI2_IRQ IRQ_IRL3
|
||||||
|
|
||||||
unsigned long epld_virt;
|
unsigned long epld_virt;
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* arch/sh64/mach-cayman/led.c
|
* arch/sh/boards/cayman/led.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002 Stuart Menefy <stuart.menefy@st.com>
|
* Copyright (C) 2002 Stuart Menefy <stuart.menefy@st.com>
|
||||||
*
|
*
|
||||||
@@ -1,28 +1,19 @@
|
|||||||
/*
|
/*
|
||||||
* This file is subject to the terms and conditions of the GNU General Public
|
* arch/sh/mach-cayman/setup.c
|
||||||
* License. See the file "COPYING" in the main directory of this archive
|
|
||||||
* for more details.
|
|
||||||
*
|
|
||||||
* arch/sh64/mach-cayman/setup.c
|
|
||||||
*
|
*
|
||||||
* SH5 Cayman support
|
* SH5 Cayman support
|
||||||
*
|
*
|
||||||
* This file handles the architecture-dependent parts of initialization
|
* Copyright (C) 2002 David J. Mckay & Benedict Gaster
|
||||||
|
* Copyright (C) 2003 - 2007 Paul Mundt
|
||||||
*
|
*
|
||||||
* Copyright David J. Mckay.
|
* This file is subject to the terms and conditions of the GNU General Public
|
||||||
* Needs major work!
|
* License. See the file "COPYING" in the main directory of this archive
|
||||||
*
|
* for more details.
|
||||||
* 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.
|
|
||||||
*/
|
*/
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
|
#include <linux/io.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <asm/platform.h>
|
#include <asm/cpu/irq.h>
|
||||||
#include <asm/irq.h>
|
|
||||||
#include <asm/io.h>
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Platform Dependent Interrupt Priorities.
|
* Platform Dependent Interrupt Priorities.
|
||||||
@@ -96,42 +87,6 @@
|
|||||||
|
|
||||||
unsigned long smsc_superio_virt;
|
unsigned long smsc_superio_virt;
|
||||||
|
|
||||||
/*
|
|
||||||
* Platform dependent structures: maps and parms block.
|
|
||||||
*/
|
|
||||||
struct resource io_resources[] = {
|
|
||||||
/* To be updated with external devices */
|
|
||||||
};
|
|
||||||
|
|
||||||
struct resource kram_resources[] = {
|
|
||||||
/* 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[] = {
|
|
||||||
/* 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 = ARRAY_SIZE(io_resources),
|
|
||||||
.kram_res_p = kram_resources,
|
|
||||||
.kram_res_count = ARRAY_SIZE(kram_resources),
|
|
||||||
.xram_res_p = xram_resources,
|
|
||||||
.xram_res_count = ARRAY_SIZE(xram_resources),
|
|
||||||
.rom_res_p = rom_resources,
|
|
||||||
.rom_res_count = ARRAY_SIZE(rom_resources),
|
|
||||||
};
|
|
||||||
|
|
||||||
int platform_int_priority[NR_INTC_IRQS] = {
|
int platform_int_priority[NR_INTC_IRQS] = {
|
||||||
IR0, IR1, IR2, IR3, PCA, PCB, PCC, PCD, /* IRQ 0- 7 */
|
IR0, IR1, IR2, IR3, PCA, PCB, PCC, PCD, /* IRQ 0- 7 */
|
||||||
RES, RES, RES, RES, SER, ERR, PW3, PW2, /* IRQ 8-15 */
|
RES, RES, RES, RES, SER, ERR, PW3, PW2, /* IRQ 8-15 */
|
||||||
@@ -210,30 +165,23 @@ static int __init smsc_superio_setup(void)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This is grotty, but, because kernel is always referenced on the link line
|
|
||||||
* before any devices, this is safe.
|
|
||||||
*/
|
|
||||||
__initcall(smsc_superio_setup);
|
__initcall(smsc_superio_setup);
|
||||||
|
|
||||||
void __init platform_setup(void)
|
static void __iomem *cayman_ioport_map(unsigned long port, unsigned int len)
|
||||||
{
|
{
|
||||||
/* Cayman platform leaves the decision to head.S, for now */
|
if (port < 0x400) {
|
||||||
platform_parms.fpu_flags = fpu_in_use;
|
extern unsigned long smsc_superio_virt;
|
||||||
|
return (void __iomem *)((port << 2) | smsc_superio_virt);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (void __iomem *)port;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __init platform_monitor(void)
|
extern void init_cayman_irq(void);
|
||||||
{
|
|
||||||
/* Nothing yet .. */
|
|
||||||
}
|
|
||||||
|
|
||||||
void __init platform_reserve(void)
|
|
||||||
{
|
|
||||||
/* Nothing yet .. */
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *get_system_type(void)
|
|
||||||
{
|
|
||||||
return "Hitachi Cayman";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
static struct sh_machine_vector mv_cayman __initmv = {
|
||||||
|
.mv_name = "Hitachi Cayman",
|
||||||
|
.mv_nr_irqs = 64,
|
||||||
|
.mv_ioport_map = cayman_ioport_map,
|
||||||
|
.mv_init_irq = init_cayman_irq,
|
||||||
|
};
|
||||||
@@ -136,7 +136,7 @@ int systemasic_irq_demux(int irq)
|
|||||||
emr = EMR_BASE + (level << 4) + (level << 2);
|
emr = EMR_BASE + (level << 4) + (level << 2);
|
||||||
esr = ESR_BASE + (level << 2);
|
esr = ESR_BASE + (level << 2);
|
||||||
|
|
||||||
/* Mask the ESR to filter any spurious, unwanted interrtupts */
|
/* Mask the ESR to filter any spurious, unwanted interrupts */
|
||||||
status = inl(esr);
|
status = inl(esr);
|
||||||
status &= inl(emr);
|
status &= inl(emr);
|
||||||
|
|
||||||
|
|||||||
@@ -33,9 +33,6 @@ extern void aica_time_init(void);
|
|||||||
extern int gapspci_init(void);
|
extern int gapspci_init(void);
|
||||||
extern int systemasic_irq_demux(int);
|
extern int systemasic_irq_demux(int);
|
||||||
|
|
||||||
void *dreamcast_consistent_alloc(struct device *, size_t, dma_addr_t *, gfp_t);
|
|
||||||
int dreamcast_consistent_free(struct device *, size_t, void *, dma_addr_t);
|
|
||||||
|
|
||||||
static void __init dreamcast_setup(char **cmdline_p)
|
static void __init dreamcast_setup(char **cmdline_p)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@@ -64,9 +61,4 @@ static struct sh_machine_vector mv_dreamcast __initmv = {
|
|||||||
.mv_name = "Sega Dreamcast",
|
.mv_name = "Sega Dreamcast",
|
||||||
.mv_setup = dreamcast_setup,
|
.mv_setup = dreamcast_setup,
|
||||||
.mv_irq_demux = systemasic_irq_demux,
|
.mv_irq_demux = systemasic_irq_demux,
|
||||||
|
|
||||||
#ifdef CONFIG_PCI
|
|
||||||
.mv_consistent_alloc = dreamcast_consistent_alloc,
|
|
||||||
.mv_consistent_free = dreamcast_consistent_free,
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ static int gio_ioctl(struct inode *inode, struct file *filp,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations gio_fops = {
|
static const struct file_operations gio_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.open = gio_open, /* open */
|
.open = gio_open, /* open */
|
||||||
.release = gio_close, /* release */
|
.release = gio_close, /* release */
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
if SH_HS7751RVOIP
|
|
||||||
|
|
||||||
menu "HS7751RVoIP options"
|
|
||||||
|
|
||||||
config HS7751RVOIP_CODEC
|
|
||||||
bool "Support VoIP Codec section"
|
|
||||||
help
|
|
||||||
Selecting this option will support CODEC section.
|
|
||||||
|
|
||||||
endmenu
|
|
||||||
|
|
||||||
endif
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
#
|
|
||||||
# Makefile for the HS7751RVoIP specific parts of the kernel
|
|
||||||
#
|
|
||||||
|
|
||||||
obj-y := setup.o io.o irq.o
|
|
||||||
|
|
||||||
obj-$(CONFIG_PCI) += pci.o
|
|
||||||
|
|
||||||
@@ -1,283 +0,0 @@
|
|||||||
/*
|
|
||||||
* linux/arch/sh/boards/renesas/hs7751rvoip/io.c
|
|
||||||
*
|
|
||||||
* Copyright (C) 2001 Ian da Silva, Jeremy Siegel
|
|
||||||
* Based largely on io_se.c.
|
|
||||||
*
|
|
||||||
* I/O routine for Renesas Technology sales HS7751RVoIP
|
|
||||||
*
|
|
||||||
* Initial version only to support LAN access; some
|
|
||||||
* placeholder code from io_hs7751rvoip.c left in with the
|
|
||||||
* expectation of later SuperIO and PCMCIA access.
|
|
||||||
*/
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/types.h>
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/pci.h>
|
|
||||||
#include <asm/io.h>
|
|
||||||
#include <asm/hs7751rvoip.h>
|
|
||||||
#include <asm/addrspace.h>
|
|
||||||
|
|
||||||
extern void *area6_io8_base; /* Area 6 8bit I/O Base address */
|
|
||||||
extern void *area5_io16_base; /* Area 5 16bit I/O Base address */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The 7751R HS7751RVoIP uses the built-in PCI controller (PCIC)
|
|
||||||
* of the 7751R processor, and has a SuperIO accessible via the PCI.
|
|
||||||
* The board also includes a PCMCIA controller on its memory bus,
|
|
||||||
* like the other Solution Engine boards.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define CODEC_IO_BASE 0x1000
|
|
||||||
#define CODEC_IOMAP(a) ((unsigned long)area6_io8_base + ((a) - CODEC_IO_BASE))
|
|
||||||
|
|
||||||
static inline unsigned long port2adr(unsigned int port)
|
|
||||||
{
|
|
||||||
if ((0x1f0 <= port && port < 0x1f8) || port == 0x3f6)
|
|
||||||
if (port == 0x3f6)
|
|
||||||
return ((unsigned long)area5_io16_base + 0x0c);
|
|
||||||
else
|
|
||||||
return ((unsigned long)area5_io16_base + 0x800 +
|
|
||||||
((port-0x1f0) << 1));
|
|
||||||
else
|
|
||||||
maybebadio((unsigned long)port);
|
|
||||||
return port;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The 7751R HS7751RVoIP seems to have everything hooked */
|
|
||||||
/* up pretty normally (nothing on high-bytes only...) so this */
|
|
||||||
/* shouldn't be needed */
|
|
||||||
static inline int shifted_port(unsigned long port)
|
|
||||||
{
|
|
||||||
/* For IDE registers, value is not shifted */
|
|
||||||
if ((0x1f0 <= port && port < 0x1f8) || port == 0x3f6)
|
|
||||||
return 0;
|
|
||||||
else
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(CONFIG_HS7751RVOIP_CODEC)
|
|
||||||
#define codec_port(port) \
|
|
||||||
((CODEC_IO_BASE <= (port)) && ((port) < (CODEC_IO_BASE + 0x20)))
|
|
||||||
#else
|
|
||||||
#define codec_port(port) (0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* General outline: remap really low stuff [eventually] to SuperIO,
|
|
||||||
* stuff in PCI IO space (at or above window at pci.h:PCIBIOS_MIN_IO)
|
|
||||||
* is mapped through the PCI IO window. Stuff with high bits (PXSEG)
|
|
||||||
* should be way beyond the window, and is used w/o translation for
|
|
||||||
* compatibility.
|
|
||||||
*/
|
|
||||||
unsigned char hs7751rvoip_inb(unsigned long port)
|
|
||||||
{
|
|
||||||
if (PXSEG(port))
|
|
||||||
return ctrl_inb(port);
|
|
||||||
else if (codec_port(port))
|
|
||||||
return ctrl_inb(CODEC_IOMAP(port));
|
|
||||||
else if (is_pci_ioaddr(port) || shifted_port(port))
|
|
||||||
return ctrl_inb(pci_ioaddr(port));
|
|
||||||
else
|
|
||||||
return ctrl_inw(port2adr(port)) & 0xff;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned char hs7751rvoip_inb_p(unsigned long port)
|
|
||||||
{
|
|
||||||
unsigned char v;
|
|
||||||
|
|
||||||
if (PXSEG(port))
|
|
||||||
v = ctrl_inb(port);
|
|
||||||
else if (codec_port(port))
|
|
||||||
v = ctrl_inb(CODEC_IOMAP(port));
|
|
||||||
else if (is_pci_ioaddr(port) || shifted_port(port))
|
|
||||||
v = ctrl_inb(pci_ioaddr(port));
|
|
||||||
else
|
|
||||||
v = ctrl_inw(port2adr(port)) & 0xff;
|
|
||||||
ctrl_delay();
|
|
||||||
return v;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned short hs7751rvoip_inw(unsigned long port)
|
|
||||||
{
|
|
||||||
if (PXSEG(port))
|
|
||||||
return ctrl_inw(port);
|
|
||||||
else if (is_pci_ioaddr(port) || shifted_port(port))
|
|
||||||
return ctrl_inw(pci_ioaddr(port));
|
|
||||||
else
|
|
||||||
maybebadio(port);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int hs7751rvoip_inl(unsigned long port)
|
|
||||||
{
|
|
||||||
if (PXSEG(port))
|
|
||||||
return ctrl_inl(port);
|
|
||||||
else if (is_pci_ioaddr(port) || shifted_port(port))
|
|
||||||
return ctrl_inl(pci_ioaddr(port));
|
|
||||||
else
|
|
||||||
maybebadio(port);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void hs7751rvoip_outb(unsigned char value, unsigned long port)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (PXSEG(port))
|
|
||||||
ctrl_outb(value, port);
|
|
||||||
else if (codec_port(port))
|
|
||||||
ctrl_outb(value, CODEC_IOMAP(port));
|
|
||||||
else if (is_pci_ioaddr(port) || shifted_port(port))
|
|
||||||
ctrl_outb(value, pci_ioaddr(port));
|
|
||||||
else
|
|
||||||
ctrl_outb(value, port2adr(port));
|
|
||||||
}
|
|
||||||
|
|
||||||
void hs7751rvoip_outb_p(unsigned char value, unsigned long port)
|
|
||||||
{
|
|
||||||
if (PXSEG(port))
|
|
||||||
ctrl_outb(value, port);
|
|
||||||
else if (codec_port(port))
|
|
||||||
ctrl_outb(value, CODEC_IOMAP(port));
|
|
||||||
else if (is_pci_ioaddr(port) || shifted_port(port))
|
|
||||||
ctrl_outb(value, pci_ioaddr(port));
|
|
||||||
else
|
|
||||||
ctrl_outw(value, port2adr(port));
|
|
||||||
|
|
||||||
ctrl_delay();
|
|
||||||
}
|
|
||||||
|
|
||||||
void hs7751rvoip_outw(unsigned short value, unsigned long port)
|
|
||||||
{
|
|
||||||
if (PXSEG(port))
|
|
||||||
ctrl_outw(value, port);
|
|
||||||
else if (is_pci_ioaddr(port) || shifted_port(port))
|
|
||||||
ctrl_outw(value, pci_ioaddr(port));
|
|
||||||
else
|
|
||||||
maybebadio(port);
|
|
||||||
}
|
|
||||||
|
|
||||||
void hs7751rvoip_outl(unsigned int value, unsigned long port)
|
|
||||||
{
|
|
||||||
if (PXSEG(port))
|
|
||||||
ctrl_outl(value, port);
|
|
||||||
else if (is_pci_ioaddr(port) || shifted_port(port))
|
|
||||||
ctrl_outl(value, pci_ioaddr(port));
|
|
||||||
else
|
|
||||||
maybebadio(port);
|
|
||||||
}
|
|
||||||
|
|
||||||
void hs7751rvoip_insb(unsigned long port, void *addr, unsigned long count)
|
|
||||||
{
|
|
||||||
u8 *buf = addr;
|
|
||||||
|
|
||||||
if (PXSEG(port))
|
|
||||||
while (count--)
|
|
||||||
*buf++ = ctrl_inb(port);
|
|
||||||
else if (codec_port(port))
|
|
||||||
while (count--)
|
|
||||||
*buf++ = ctrl_inb(CODEC_IOMAP(port));
|
|
||||||
else if (is_pci_ioaddr(port) || shifted_port(port)) {
|
|
||||||
volatile u8 *bp = (volatile u8 *)pci_ioaddr(port);
|
|
||||||
|
|
||||||
while (count--)
|
|
||||||
*buf++ = *bp;
|
|
||||||
} else {
|
|
||||||
volatile u16 *p = (volatile u16 *)port2adr(port);
|
|
||||||
|
|
||||||
while (count--)
|
|
||||||
*buf++ = *p & 0xff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void hs7751rvoip_insw(unsigned long port, void *addr, unsigned long count)
|
|
||||||
{
|
|
||||||
volatile u16 *p;
|
|
||||||
u16 *buf = addr;
|
|
||||||
|
|
||||||
if (PXSEG(port))
|
|
||||||
p = (volatile u16 *)port;
|
|
||||||
else if (is_pci_ioaddr(port) || shifted_port(port))
|
|
||||||
p = (volatile u16 *)pci_ioaddr(port);
|
|
||||||
else
|
|
||||||
p = (volatile u16 *)port2adr(port);
|
|
||||||
while (count--)
|
|
||||||
*buf++ = *p;
|
|
||||||
}
|
|
||||||
|
|
||||||
void hs7751rvoip_insl(unsigned long port, void *addr, unsigned long count)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (is_pci_ioaddr(port) || shifted_port(port)) {
|
|
||||||
volatile u32 *p = (volatile u32 *)pci_ioaddr(port);
|
|
||||||
u32 *buf = addr;
|
|
||||||
|
|
||||||
while (count--)
|
|
||||||
*buf++ = *p;
|
|
||||||
} else
|
|
||||||
maybebadio(port);
|
|
||||||
}
|
|
||||||
|
|
||||||
void hs7751rvoip_outsb(unsigned long port, const void *addr, unsigned long count)
|
|
||||||
{
|
|
||||||
const u8 *buf = addr;
|
|
||||||
|
|
||||||
if (PXSEG(port))
|
|
||||||
while (count--)
|
|
||||||
ctrl_outb(*buf++, port);
|
|
||||||
else if (codec_port(port))
|
|
||||||
while (count--)
|
|
||||||
ctrl_outb(*buf++, CODEC_IOMAP(port));
|
|
||||||
else if (is_pci_ioaddr(port) || shifted_port(port)) {
|
|
||||||
volatile u8 *bp = (volatile u8 *)pci_ioaddr(port);
|
|
||||||
|
|
||||||
while (count--)
|
|
||||||
*bp = *buf++;
|
|
||||||
} else {
|
|
||||||
volatile u16 *p = (volatile u16 *)port2adr(port);
|
|
||||||
|
|
||||||
while (count--)
|
|
||||||
*p = *buf++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void hs7751rvoip_outsw(unsigned long port, const void *addr, unsigned long count)
|
|
||||||
{
|
|
||||||
volatile u16 *p;
|
|
||||||
const u16 *buf = addr;
|
|
||||||
|
|
||||||
if (PXSEG(port))
|
|
||||||
p = (volatile u16 *)port;
|
|
||||||
else if (is_pci_ioaddr(port) || shifted_port(port))
|
|
||||||
p = (volatile u16 *)pci_ioaddr(port);
|
|
||||||
else
|
|
||||||
p = (volatile u16 *)port2adr(port);
|
|
||||||
|
|
||||||
while (count--)
|
|
||||||
*p = *buf++;
|
|
||||||
}
|
|
||||||
|
|
||||||
void hs7751rvoip_outsl(unsigned long port, const void *addr, unsigned long count)
|
|
||||||
{
|
|
||||||
const u32 *buf = addr;
|
|
||||||
|
|
||||||
if (is_pci_ioaddr(port) || shifted_port(port)) {
|
|
||||||
volatile u32 *p = (volatile u32 *)pci_ioaddr(port);
|
|
||||||
|
|
||||||
while (count--)
|
|
||||||
*p = *buf++;
|
|
||||||
} else
|
|
||||||
maybebadio(port);
|
|
||||||
}
|
|
||||||
|
|
||||||
void __iomem *hs7751rvoip_ioport_map(unsigned long port, unsigned int size)
|
|
||||||
{
|
|
||||||
if (PXSEG(port))
|
|
||||||
return (void __iomem *)port;
|
|
||||||
else if (unlikely(codec_port(port) && (size == 1)))
|
|
||||||
return (void __iomem *)CODEC_IOMAP(port);
|
|
||||||
else if (is_pci_ioaddr(port))
|
|
||||||
return (void __iomem *)pci_ioaddr(port);
|
|
||||||
|
|
||||||
return (void __iomem *)port2adr(port);
|
|
||||||
}
|
|
||||||
@@ -1,116 +0,0 @@
|
|||||||
/*
|
|
||||||
* linux/arch/sh/boards/renesas/hs7751rvoip/irq.c
|
|
||||||
*
|
|
||||||
* Copyright (C) 2000 Kazumoto Kojima
|
|
||||||
*
|
|
||||||
* Renesas Technology Sales HS7751RVoIP Support.
|
|
||||||
*
|
|
||||||
* Modified for HS7751RVoIP by
|
|
||||||
* Atom Create Engineering Co., Ltd. 2002.
|
|
||||||
* Lineo uSolutions, Inc. 2003.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <linux/init.h>
|
|
||||||
#include <linux/irq.h>
|
|
||||||
#include <linux/interrupt.h>
|
|
||||||
#include <asm/io.h>
|
|
||||||
#include <asm/irq.h>
|
|
||||||
#include <asm/hs7751rvoip.h>
|
|
||||||
|
|
||||||
static int mask_pos[] = {8, 9, 10, 11, 12, 13, 0, 1, 2, 3, 4, 5, 6, 7};
|
|
||||||
|
|
||||||
static void enable_hs7751rvoip_irq(unsigned int irq);
|
|
||||||
static void disable_hs7751rvoip_irq(unsigned int irq);
|
|
||||||
|
|
||||||
/* shutdown is same as "disable" */
|
|
||||||
#define shutdown_hs7751rvoip_irq disable_hs7751rvoip_irq
|
|
||||||
|
|
||||||
static void ack_hs7751rvoip_irq(unsigned int irq);
|
|
||||||
static void end_hs7751rvoip_irq(unsigned int irq);
|
|
||||||
|
|
||||||
static unsigned int startup_hs7751rvoip_irq(unsigned int irq)
|
|
||||||
{
|
|
||||||
enable_hs7751rvoip_irq(irq);
|
|
||||||
return 0; /* never anything pending */
|
|
||||||
}
|
|
||||||
|
|
||||||
static void disable_hs7751rvoip_irq(unsigned int irq)
|
|
||||||
{
|
|
||||||
unsigned short val;
|
|
||||||
unsigned short mask = 0xffff ^ (0x0001 << mask_pos[irq]);
|
|
||||||
|
|
||||||
/* Set the priority in IPR to 0 */
|
|
||||||
val = ctrl_inw(IRLCNTR3);
|
|
||||||
val &= mask;
|
|
||||||
ctrl_outw(val, IRLCNTR3);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void enable_hs7751rvoip_irq(unsigned int irq)
|
|
||||||
{
|
|
||||||
unsigned short val;
|
|
||||||
unsigned short value = (0x0001 << mask_pos[irq]);
|
|
||||||
|
|
||||||
/* Set priority in IPR back to original value */
|
|
||||||
val = ctrl_inw(IRLCNTR3);
|
|
||||||
val |= value;
|
|
||||||
ctrl_outw(val, IRLCNTR3);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void ack_hs7751rvoip_irq(unsigned int irq)
|
|
||||||
{
|
|
||||||
disable_hs7751rvoip_irq(irq);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void end_hs7751rvoip_irq(unsigned int irq)
|
|
||||||
{
|
|
||||||
if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
|
|
||||||
enable_hs7751rvoip_irq(irq);
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct hw_interrupt_type hs7751rvoip_irq_type = {
|
|
||||||
.typename = "HS7751RVoIP IRQ",
|
|
||||||
.startup = startup_hs7751rvoip_irq,
|
|
||||||
.shutdown = shutdown_hs7751rvoip_irq,
|
|
||||||
.enable = enable_hs7751rvoip_irq,
|
|
||||||
.disable = disable_hs7751rvoip_irq,
|
|
||||||
.ack = ack_hs7751rvoip_irq,
|
|
||||||
.end = end_hs7751rvoip_irq,
|
|
||||||
};
|
|
||||||
|
|
||||||
static void make_hs7751rvoip_irq(unsigned int irq)
|
|
||||||
{
|
|
||||||
disable_irq_nosync(irq);
|
|
||||||
irq_desc[irq].chip = &hs7751rvoip_irq_type;
|
|
||||||
disable_hs7751rvoip_irq(irq);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialize IRQ setting
|
|
||||||
*/
|
|
||||||
void __init init_hs7751rvoip_IRQ(void)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
/* IRL0=ON HOOK1
|
|
||||||
* IRL1=OFF HOOK1
|
|
||||||
* IRL2=ON HOOK2
|
|
||||||
* IRL3=OFF HOOK2
|
|
||||||
* IRL4=Ringing Detection
|
|
||||||
* IRL5=CODEC
|
|
||||||
* IRL6=Ethernet
|
|
||||||
* IRL7=Ethernet Hub
|
|
||||||
* IRL8=USB Communication
|
|
||||||
* IRL9=USB Connection
|
|
||||||
* IRL10=USB DMA
|
|
||||||
* IRL11=CF Card
|
|
||||||
* IRL12=PCMCIA
|
|
||||||
* IRL13=PCI Slot
|
|
||||||
*/
|
|
||||||
ctrl_outw(0x9876, IRLCNTR1);
|
|
||||||
ctrl_outw(0xdcba, IRLCNTR2);
|
|
||||||
ctrl_outw(0x0050, IRLCNTR4);
|
|
||||||
ctrl_outw(0x4321, IRLCNTR5);
|
|
||||||
|
|
||||||
for (i=0; i<14; i++)
|
|
||||||
make_hs7751rvoip_irq(i);
|
|
||||||
}
|
|
||||||
@@ -1,149 +0,0 @@
|
|||||||
/*
|
|
||||||
* linux/arch/sh/boards/renesas/hs7751rvoip/pci.c
|
|
||||||
*
|
|
||||||
* Author: Ian DaSilva (idasilva@mvista.com)
|
|
||||||
*
|
|
||||||
* Highly leveraged from pci-bigsur.c, written by Dustin McIntire.
|
|
||||||
*
|
|
||||||
* May be copied or modified under the terms of the GNU General Public
|
|
||||||
* License. See linux/COPYING for more information.
|
|
||||||
*
|
|
||||||
* PCI initialization for the Renesas SH7751R HS7751RVoIP board
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/types.h>
|
|
||||||
#include <linux/init.h>
|
|
||||||
#include <linux/delay.h>
|
|
||||||
#include <linux/pci.h>
|
|
||||||
#include <linux/module.h>
|
|
||||||
|
|
||||||
#include <asm/io.h>
|
|
||||||
#include "../../../drivers/pci/pci-sh7751.h"
|
|
||||||
#include <asm/hs7751rvoip/hs7751rvoip.h>
|
|
||||||
|
|
||||||
#define PCIMCR_MRSET_OFF 0xBFFFFFFF
|
|
||||||
#define PCIMCR_RFSH_OFF 0xFFFFFFFB
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Only long word accesses of the PCIC's internal local registers and the
|
|
||||||
* configuration registers from the CPU is supported.
|
|
||||||
*/
|
|
||||||
#define PCIC_WRITE(x,v) writel((v), PCI_REG(x))
|
|
||||||
#define PCIC_READ(x) readl(PCI_REG(x))
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Description: This function sets up and initializes the pcic, sets
|
|
||||||
* up the BARS, maps the DRAM into the address space etc, etc.
|
|
||||||
*/
|
|
||||||
int __init pcibios_init_platform(void)
|
|
||||||
{
|
|
||||||
unsigned long bcr1, wcr1, wcr2, wcr3, mcr;
|
|
||||||
unsigned short bcr2, bcr3;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialize the slave bus controller on the pcic. The values used
|
|
||||||
* here should not be hardcoded, but they should be taken from the bsc
|
|
||||||
* on the processor, to make this function as generic as possible.
|
|
||||||
* (i.e. Another sbc may usr different SDRAM timing settings -- in order
|
|
||||||
* for the pcic to work, its settings need to be exactly the same.)
|
|
||||||
*/
|
|
||||||
bcr1 = (*(volatile unsigned long *)(SH7751_BCR1));
|
|
||||||
bcr2 = (*(volatile unsigned short *)(SH7751_BCR2));
|
|
||||||
bcr3 = (*(volatile unsigned short *)(SH7751_BCR3));
|
|
||||||
wcr1 = (*(volatile unsigned long *)(SH7751_WCR1));
|
|
||||||
wcr2 = (*(volatile unsigned long *)(SH7751_WCR2));
|
|
||||||
wcr3 = (*(volatile unsigned long *)(SH7751_WCR3));
|
|
||||||
mcr = (*(volatile unsigned long *)(SH7751_MCR));
|
|
||||||
|
|
||||||
bcr1 = bcr1 | 0x00080000; /* Enable Bit 19, BREQEN */
|
|
||||||
(*(volatile unsigned long *)(SH7751_BCR1)) = bcr1;
|
|
||||||
|
|
||||||
bcr1 = bcr1 | 0x40080000; /* Enable Bit 19 BREQEN, set PCIC to slave */
|
|
||||||
PCIC_WRITE(SH7751_PCIBCR1, bcr1); /* PCIC BCR1 */
|
|
||||||
PCIC_WRITE(SH7751_PCIBCR2, bcr2); /* PCIC BCR2 */
|
|
||||||
PCIC_WRITE(SH7751_PCIBCR3, bcr3); /* PCIC BCR3 */
|
|
||||||
PCIC_WRITE(SH7751_PCIWCR1, wcr1); /* PCIC WCR1 */
|
|
||||||
PCIC_WRITE(SH7751_PCIWCR2, wcr2); /* PCIC WCR2 */
|
|
||||||
PCIC_WRITE(SH7751_PCIWCR3, wcr3); /* PCIC WCR3 */
|
|
||||||
mcr = (mcr & PCIMCR_MRSET_OFF) & PCIMCR_RFSH_OFF;
|
|
||||||
PCIC_WRITE(SH7751_PCIMCR, mcr); /* PCIC MCR */
|
|
||||||
|
|
||||||
/* Enable all interrupts, so we know what to fix */
|
|
||||||
PCIC_WRITE(SH7751_PCIINTM, 0x0000c3ff);
|
|
||||||
PCIC_WRITE(SH7751_PCIAINTM, 0x0000380f);
|
|
||||||
|
|
||||||
/* Set up standard PCI config registers */
|
|
||||||
PCIC_WRITE(SH7751_PCICONF1, 0xFB900047); /* Bus Master, Mem & I/O access */
|
|
||||||
PCIC_WRITE(SH7751_PCICONF2, 0x00000000); /* PCI Class code & Revision ID */
|
|
||||||
PCIC_WRITE(SH7751_PCICONF4, 0xab000001); /* PCI I/O address (local regs) */
|
|
||||||
PCIC_WRITE(SH7751_PCICONF5, 0x0c000000); /* PCI MEM address (local RAM) */
|
|
||||||
PCIC_WRITE(SH7751_PCICONF6, 0xd0000000); /* PCI MEM address (unused) */
|
|
||||||
PCIC_WRITE(SH7751_PCICONF11, 0x35051054); /* PCI Subsystem ID & Vendor ID */
|
|
||||||
PCIC_WRITE(SH7751_PCILSR0, 0x03f00000); /* MEM (full 64M exposed) */
|
|
||||||
PCIC_WRITE(SH7751_PCILSR1, 0x00000000); /* MEM (unused) */
|
|
||||||
PCIC_WRITE(SH7751_PCILAR0, 0x0c000000); /* MEM (direct map from PCI) */
|
|
||||||
PCIC_WRITE(SH7751_PCILAR1, 0x00000000); /* MEM (unused) */
|
|
||||||
|
|
||||||
/* Now turn it on... */
|
|
||||||
PCIC_WRITE(SH7751_PCICR, 0xa5000001);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Set PCIMBR and PCIIOBR here, assuming a single window
|
|
||||||
* (16M MEM, 256K IO) is enough. If a larger space is
|
|
||||||
* needed, the readx/writex and inx/outx functions will
|
|
||||||
* have to do more (e.g. setting registers for each call).
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Set the MBR so PCI address is one-to-one with window,
|
|
||||||
* meaning all calls go straight through... use ifdef to
|
|
||||||
* catch erroneous assumption.
|
|
||||||
*/
|
|
||||||
BUG_ON(PCIBIOS_MIN_MEM != SH7751_PCI_MEMORY_BASE);
|
|
||||||
|
|
||||||
PCIC_WRITE(SH7751_PCIMBR, PCIBIOS_MIN_MEM);
|
|
||||||
|
|
||||||
/* Set IOBR for window containing area specified in pci.h */
|
|
||||||
PCIC_WRITE(SH7751_PCIIOBR, (PCIBIOS_MIN_IO & SH7751_PCIIOBR_MASK));
|
|
||||||
|
|
||||||
/* All done, may as well say so... */
|
|
||||||
printk("SH7751R PCI: Finished initialization of the PCI controller\n");
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int __init pcibios_map_platform_irq(u8 slot, u8 pin)
|
|
||||||
{
|
|
||||||
switch (slot) {
|
|
||||||
case 0: return IRQ_PCISLOT; /* PCI Extend slot */
|
|
||||||
case 1: return IRQ_PCMCIA; /* PCI Cardbus Bridge */
|
|
||||||
case 2: return IRQ_PCIETH; /* Realtek Ethernet controller */
|
|
||||||
case 3: return IRQ_PCIHUB; /* Realtek Ethernet Hub controller */
|
|
||||||
default:
|
|
||||||
printk("PCI: Bad IRQ mapping request for slot %d\n", slot);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct resource sh7751_io_resource = {
|
|
||||||
.name = "SH7751_IO",
|
|
||||||
.start = 0x4000,
|
|
||||||
.end = 0x4000 + SH7751_PCI_IO_SIZE - 1,
|
|
||||||
.flags = IORESOURCE_IO
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct resource sh7751_mem_resource = {
|
|
||||||
.name = "SH7751_mem",
|
|
||||||
.start = SH7751_PCI_MEMORY_BASE,
|
|
||||||
.end = SH7751_PCI_MEMORY_BASE + SH7751_PCI_MEM_SIZE - 1,
|
|
||||||
.flags = IORESOURCE_MEM
|
|
||||||
};
|
|
||||||
|
|
||||||
extern struct pci_ops sh7751_pci_ops;
|
|
||||||
|
|
||||||
struct pci_channel board_pci_channels[] = {
|
|
||||||
{ &sh7751_pci_ops, &sh7751_io_resource, &sh7751_mem_resource, 0, 0xff },
|
|
||||||
{ NULL, NULL, NULL, 0, 0 },
|
|
||||||
};
|
|
||||||
EXPORT_SYMBOL(board_pci_channels);
|
|
||||||
@@ -1,105 +0,0 @@
|
|||||||
/*
|
|
||||||
* Renesas Technology Sales HS7751RVoIP Support.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2000 Kazumoto Kojima
|
|
||||||
*
|
|
||||||
* Modified for HS7751RVoIP by
|
|
||||||
* Atom Create Engineering Co., Ltd. 2002.
|
|
||||||
* Lineo uSolutions, Inc. 2003.
|
|
||||||
*/
|
|
||||||
#include <linux/init.h>
|
|
||||||
#include <linux/irq.h>
|
|
||||||
#include <linux/mm.h>
|
|
||||||
#include <linux/pm.h>
|
|
||||||
#include <asm/hs7751rvoip.h>
|
|
||||||
#include <asm/io.h>
|
|
||||||
#include <asm/machvec.h>
|
|
||||||
|
|
||||||
static void hs7751rvoip_power_off(void)
|
|
||||||
{
|
|
||||||
ctrl_outw(ctrl_inw(PA_OUTPORTR) & 0xffdf, PA_OUTPORTR);
|
|
||||||
}
|
|
||||||
|
|
||||||
void *area5_io8_base;
|
|
||||||
void *area6_io8_base;
|
|
||||||
void *area5_io16_base;
|
|
||||||
void *area6_io16_base;
|
|
||||||
|
|
||||||
static int __init hs7751rvoip_cf_init(void)
|
|
||||||
{
|
|
||||||
pgprot_t prot;
|
|
||||||
unsigned long paddrbase;
|
|
||||||
|
|
||||||
/* open I/O area window */
|
|
||||||
paddrbase = virt_to_phys((void *)(PA_AREA5_IO+0x00000800));
|
|
||||||
prot = PAGE_KERNEL_PCC(1, _PAGE_PCC_COM16);
|
|
||||||
area5_io16_base = p3_ioremap(paddrbase, PAGE_SIZE, prot.pgprot);
|
|
||||||
if (!area5_io16_base) {
|
|
||||||
printk("allocate_cf_area : can't open CF I/O window!\n");
|
|
||||||
return -ENOMEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* XXX : do we need attribute and common-memory area also? */
|
|
||||||
|
|
||||||
paddrbase = virt_to_phys((void *)PA_AREA6_IO);
|
|
||||||
#if defined(CONFIG_HS7751RVOIP_CODEC)
|
|
||||||
prot = PAGE_KERNEL_PCC(0, _PAGE_PCC_COM8);
|
|
||||||
#else
|
|
||||||
prot = PAGE_KERNEL_PCC(0, _PAGE_PCC_IO8);
|
|
||||||
#endif
|
|
||||||
area6_io8_base = p3_ioremap(paddrbase, PAGE_SIZE, prot.pgprot);
|
|
||||||
if (!area6_io8_base) {
|
|
||||||
printk("allocate_cf_area : can't open CODEC I/O 8bit window!\n");
|
|
||||||
return -ENOMEM;
|
|
||||||
}
|
|
||||||
prot = PAGE_KERNEL_PCC(0, _PAGE_PCC_IO16);
|
|
||||||
area6_io16_base = p3_ioremap(paddrbase, PAGE_SIZE, prot.pgprot);
|
|
||||||
if (!area6_io16_base) {
|
|
||||||
printk("allocate_cf_area : can't open CODEC I/O 16bit window!\n");
|
|
||||||
return -ENOMEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
device_initcall(hs7751rvoip_cf_init);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialize the board
|
|
||||||
*/
|
|
||||||
static void __init hs7751rvoip_setup(char **cmdline_p)
|
|
||||||
{
|
|
||||||
ctrl_outb(0xf0, PA_OUTPORTR);
|
|
||||||
pm_power_off = hs7751rvoip_power_off;
|
|
||||||
|
|
||||||
printk(KERN_INFO "Renesas Technology Sales HS7751RVoIP-2 support.\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct sh_machine_vector mv_hs7751rvoip __initmv = {
|
|
||||||
.mv_name = "HS7751RVoIP",
|
|
||||||
.mv_setup = hs7751rvoip_setup,
|
|
||||||
.mv_nr_irqs = 72,
|
|
||||||
|
|
||||||
.mv_inb = hs7751rvoip_inb,
|
|
||||||
.mv_inw = hs7751rvoip_inw,
|
|
||||||
.mv_inl = hs7751rvoip_inl,
|
|
||||||
.mv_outb = hs7751rvoip_outb,
|
|
||||||
.mv_outw = hs7751rvoip_outw,
|
|
||||||
.mv_outl = hs7751rvoip_outl,
|
|
||||||
|
|
||||||
.mv_inb_p = hs7751rvoip_inb_p,
|
|
||||||
.mv_inw_p = hs7751rvoip_inw,
|
|
||||||
.mv_inl_p = hs7751rvoip_inl,
|
|
||||||
.mv_outb_p = hs7751rvoip_outb_p,
|
|
||||||
.mv_outw_p = hs7751rvoip_outw,
|
|
||||||
.mv_outl_p = hs7751rvoip_outl,
|
|
||||||
|
|
||||||
.mv_insb = hs7751rvoip_insb,
|
|
||||||
.mv_insw = hs7751rvoip_insw,
|
|
||||||
.mv_insl = hs7751rvoip_insl,
|
|
||||||
.mv_outsb = hs7751rvoip_outsb,
|
|
||||||
.mv_outsw = hs7751rvoip_outsw,
|
|
||||||
.mv_outsl = hs7751rvoip_outsl,
|
|
||||||
|
|
||||||
.mv_init_irq = init_hs7751rvoip_IRQ,
|
|
||||||
.mv_ioport_map = hs7751rvoip_ioport_map,
|
|
||||||
};
|
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
irqinit-$(CONFIG_SH_R7780MP) := irq-r7780mp.o
|
irqinit-$(CONFIG_SH_R7780MP) := irq-r7780mp.o
|
||||||
irqinit-$(CONFIG_SH_R7785RP) := irq-r7785rp.o
|
irqinit-$(CONFIG_SH_R7785RP) := irq-r7785rp.o
|
||||||
irqinit-$(CONFIG_SH_R7780RP) := irq-r7780rp.o irq.o
|
irqinit-$(CONFIG_SH_R7780RP) := irq-r7780rp.o
|
||||||
obj-y := setup.o $(irqinit-y)
|
obj-y := setup.o $(irqinit-y)
|
||||||
|
|
||||||
ifneq ($(CONFIG_SH_R7785RP),y)
|
ifneq ($(CONFIG_SH_R7785RP),y)
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ static unsigned char irl2irq[HL_NR_IRL] __initdata = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static DECLARE_INTC_DESC(intc_desc, "r7780mp", vectors,
|
static DECLARE_INTC_DESC(intc_desc, "r7780mp", vectors,
|
||||||
NULL, NULL, mask_registers, NULL, NULL);
|
NULL, mask_registers, NULL, NULL);
|
||||||
|
|
||||||
unsigned char * __init highlander_init_irq_r7780mp(void)
|
unsigned char * __init highlander_init_irq_r7780mp(void)
|
||||||
{
|
{
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user