Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b98adfcc authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6: (108 commits)
  sh: Fix occasional flush_cache_4096() stack corruption.
  sh: Calculate shm alignment at runtime.
  sh: dma-mapping compile fixes.
  sh: Initial vsyscall page support.
  sh: Clean up PAGE_SIZE definition for assembly use.
  sh: Selective flush_cache_mm() flushing.
  sh: More intelligent entry_mask/way_size calculation.
  sh: Support for L2 cache on newer SH-4A CPUs.
  sh: Update kexec support for API changes.
  sh: Optimized readsl()/writesl() support.
  sh: Report movli.l/movco.l capabilities.
  sh: CPU flags in AT_HWCAP in ELF auxvt.
  sh: Add support for 4K stacks.
  sh: Enable /proc/kcore support.
  sh: stack debugging support.
  sh: select CONFIG_EMBEDDED.
  sh: machvec rework.
  sh: Solution Engine SH7343 board support.
  sh: SH7710VoIPGW board support.
  sh: Enable verbose BUG() support.
  ...
parents ba21fe71 33573c0e
Loading
Loading
Loading
Loading
+51 −77
Original line number Diff line number Diff line
@@ -41,11 +41,6 @@ Board-specific code:
        |
	.. more boards here ...

It should also be noted that each board is required to have some certain
headers. At the time of this writing, io.h is the only thing that needs
to be provided for each board, and can generally just reference generic
functions (with the exception of isa_port2addr).

Next, for companion chips:
.
`-- arch
@@ -104,12 +99,13 @@ and then populate that with sub-directories for each member of the family.
Both the Solution Engine and the hp6xx boards are an example of this.

After you have setup your new arch/sh/boards/ directory, remember that you
also must add a directory in include/asm-sh for headers localized to this
board. In order to interoperate seamlessly with the build system, it's best
to have this directory the same as the arch/sh/boards/ directory name,
though if your board is again part of a family, the build system has ways
of dealing with this, and you can feel free to name the directory after
the family member itself.
should also add a directory in include/asm-sh for headers localized to this
board (if there are going to be more than one). In order to interoperate
seamlessly with the build system, it's best to have this directory the same
as the arch/sh/boards/ directory name, though if your board is again part of
a family, the build system has ways of dealing with this (via incdir-y
overloading), and you can feel free to name the directory after the family
member itself.

There are a few things that each board is required to have, both in the
arch/sh/boards and the include/asm-sh/ heirarchy. In order to better
@@ -122,6 +118,7 @@ might look something like:
 * arch/sh/boards/vapor/setup.c - Setup code for imaginary board
 */
#include <linux/init.h>
#include <asm/rtc.h> /* for board_time_init() */

const char *get_system_type(void)
{
@@ -152,79 +149,57 @@ int __init platform_setup(void)
}

Our new imaginary board will also have to tie into the machvec in order for it
to be of any use. Currently the machvec is slowly on its way out, but is still
required for the time being. As such, let us take a look at what needs to be
done for the machvec assignment.
to be of any use.

machvec functions fall into a number of categories:

 - I/O functions to IO memory (inb etc) and PCI/main memory (readb etc).
 - I/O remapping functions (ioremap etc)
 - some initialisation functions
 - a 'heartbeat' function
 - some miscellaneous flags

The tree can be built in two ways:
 - as a fully generic build. All drivers are linked in, and all functions
   go through the machvec
 - as a machine specific build. In this case only the required drivers
   will be linked in, and some macros may be redefined to not go through
   the machvec where performance is important (in particular IO functions).

There are three ways in which IO can be performed:
 - none at all. This is really only useful for the 'unknown' machine type,
   which us designed to run on a machine about which we know nothing, and
   so all all IO instructions do nothing.
 - fully custom. In this case all IO functions go to a machine specific
   set of functions which can do what they like
 - a generic set of functions. These will cope with most situations,
   and rely on a single function, mv_port2addr, which is called through the
   machine vector, and converts an IO address into a memory address, which
   can be read from/written to directly.

Thus adding a new machine involves the following steps (I will assume I am
adding a machine called vapor):

 - add a new file include/asm-sh/vapor/io.h which contains prototypes for
 - I/O mapping functions (ioport_map, ioport_unmap, etc).
 - a 'heartbeat' function.
 - PCI and IRQ initialization routines.
 - Consistent allocators (for boards that need special allocators,
   particularly for allocating out of some board-specific SRAM for DMA
   handles).

There are machvec functions added and removed over time, so always be sure to
consult include/asm-sh/machvec.h for the current state of the machvec.

The kernel will automatically wrap in generic routines for undefined function
pointers in the machvec at boot time, as machvec functions are referenced
unconditionally throughout most of the tree. Some boards have incredibly
sparse machvecs (such as the dreamcast and sh03), whereas others must define
virtually everything (rts7751r2d).

Adding a new machine is relatively trivial (using vapor as an example):

If the board-specific definitions are quite minimalistic, as is the case for
the vast majority of boards, simply having a single board-specific header is
sufficient.

 - add a new file include/asm-sh/vapor.h which contains prototypes for
   any machine specific IO functions prefixed with the machine name, for
   example vapor_inb. These will be needed when filling out the machine
   vector.

   This is the minimum that is required, however there are ample
   opportunities to optimise this. In particular, by making the prototypes
   inline function definitions, it is possible to inline the function when
   building machine specific versions. Note that the machine vector
   functions will still be needed, so that a module built for a generic
   setup can be loaded.
   Note that these prototypes are generated automatically by setting
   __IO_PREFIX to something sensible. A typical example would be:

 - add a new file arch/sh/boards/vapor/mach.c. This contains the definition
   of the machine vector. When building the machine specific version, this
   will be the real machine vector (via an alias), while in the generic
   version is used to initialise the machine vector, and then freed, by
   making it initdata. This should be defined as:
	#define __IO_PREFIX vapor
   	#include <asm/io_generic.h>

   somewhere in the board-specific header. Any boards being ported that still
   have a legacy io.h should remove it entirely and switch to the new model.

 - Add machine vector definitions to the board's setup.c. At a bare minimum,
   this must be defined as something like:

	struct sh_machine_vector mv_vapor __initmv = {
		.mv_name = "vapor",
     }
	};
	ALIAS_MV(vapor)

 - finally add a file arch/sh/boards/vapor/io.c, which contains
   definitions of the machine specific io functions.

A note about initialisation functions. Three initialisation functions are
provided in the machine vector:
 - mv_arch_init - called very early on from setup_arch
 - mv_init_irq - called from init_IRQ, after the generic SH interrupt
   initialisation
 - mv_init_pci - currently not used

Any other remaining functions which need to be called at start up can be
added to the list using the __initcalls macro (or module_init if the code
can be built as a module). Many generic drivers probe to see if the device
they are targeting is present, however this may not always be appropriate,
so a flag can be added to the machine vector which will be set on those
machines which have the hardware in question, reducing the probe to a
single conditional.
 - finally add a file arch/sh/boards/vapor/io.c, which contains definitions of
   the machine specific io functions (if there are enough to warrant it).

3. Hooking into the Build System
================================
@@ -303,4 +278,3 @@ which will in turn copy the defconfig for this board, run it through
oldconfig (prompting you for any new options since the time of creation),
and start you on your way to having a functional kernel for your new
board.
+33 −0
Original line number Diff line number Diff line
	Notes on register bank usage in the kernel
	==========================================

Introduction
------------

The SH-3 and SH-4 CPU families traditionally include a single partial register
bank (selected by SR.RB, only r0 ... r7 are banked), whereas other families
may have more full-featured banking or simply no such capabilities at all.

SR.RB banking
-------------

In the case of this type of banking, banked registers are mapped directly to
r0 ... r7 if SR.RB is set to the bank we are interested in, otherwise ldc/stc
can still be used to reference the banked registers (as r0_bank ... r7_bank)
when in the context of another bank. The developer must keep the SR.RB value
in mind when writing code that utilizes these banked registers, for obvious
reasons. Userspace is also not able to poke at the bank1 values, so these can
be used rather effectively as scratch registers by the kernel.

Presently the kernel uses several of these registers.

	- r0_bank, r1_bank (referenced as k0 and k1, used for scratch
	  registers when doing exception handling).
	- r2_bank (used to track the EXPEVT/INTEVT code)
		- Used by do_IRQ() and friends for doing irq mapping based off
		  of the interrupt exception vector jump table offset
	- r6_bank (global interrupt mask)
		- The SR.IMASK interrupt handler makes use of this to set the
		  interrupt priority level (used by local_irq_enable())
	- r7_bank (current)
+75 −98
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ mainmenu "Linux/SuperH Kernel Configuration"
config SUPERH
	bool
	default y
	select EMBEDDED
	help
	  The SuperH is a RISC processor targeted for use in embedded systems
	  and consumer electronics; it was also used in the Sega Dreamcast
@@ -51,18 +52,23 @@ source "init/Kconfig"

menu "System type"

config SOLUTION_ENGINE
	bool

choice
	prompt "SuperH system type"
	default SH_UNKNOWN

config SH_SOLUTION_ENGINE
	bool "SolutionEngine"
	select SOLUTION_ENGINE
	help
	  Select SolutionEngine if configuring for a Hitachi SH7709
	  or SH7750 evaluation board.

config SH_7751_SOLUTION_ENGINE
	bool "SolutionEngine7751"
	select SOLUTION_ENGINE
	select CPU_SUBTYPE_SH7751
	help
	  Select 7751 SolutionEngine if configuring for a Hitachi SH7751
@@ -70,17 +76,27 @@ config SH_7751_SOLUTION_ENGINE

config SH_7300_SOLUTION_ENGINE
	bool "SolutionEngine7300"
	select SOLUTION_ENGINE
	select CPU_SUBTYPE_SH7300
	help
	  Select 7300 SolutionEngine if configuring for a Hitachi SH7300(SH-Mobile V)
	  evaluation board.
	  Select 7300 SolutionEngine if configuring for a Hitachi
	  SH7300(SH-Mobile V) evaluation board.

config SH_7343_SOLUTION_ENGINE
	bool "SolutionEngine7343"
	select SOLUTION_ENGINE
	select CPU_SUBTYPE_SH7343
	help
	  Select 7343 SolutionEngine if configuring for a Hitachi
	  SH7343 (SH-Mobile 3AS) evaluation board.

config SH_73180_SOLUTION_ENGINE
       bool "SolutionEngine73180"
	select SOLUTION_ENGINE
	select CPU_SUBTYPE_SH73180
	help
         Select 73180 SolutionEngine if configuring for a Hitachi SH73180(SH-Mobile 3)
         evaluation board.
	  Select 73180 SolutionEngine if configuring for a Hitachi
	  SH73180(SH-Mobile 3) evaluation board.

config SH_7751_SYSTEMH
	bool "SystemH7751R"
@@ -89,12 +105,6 @@ config SH_7751_SYSTEMH
	  Select SystemH if you are configuring for a Renesas SystemH
	  7751R evaluation board.

config SH_STB1_HARP
	bool "STB1_Harp"

config SH_STB1_OVERDRIVE
	bool "STB1_Overdrive"

config SH_HP6XX
	bool "HP6XX"
	help
@@ -102,19 +112,6 @@ config SH_HP6XX
	  More information (hardware only) at
	  <http://www.hp.com/jornada/>.

config SH_CQREEK
	bool "CqREEK"
	help
	  Select CqREEK if configuring for a CqREEK SH7708 or SH7750.
	  More information at
	  <http://sources.redhat.com/ecos/hardware.html#SuperH>.

config SH_DMIDA
	bool "DMIDA"
	help
	  Select DMIDA if configuring for a DataMyte 4000 Industrial
	  Digital Assistant. More information at <http://www.dmida.com/>.

config SH_EC3104
	bool "EC3104"
	help
@@ -136,25 +133,9 @@ config SH_DREAMCAST
	  <http://www.m17n.org/linux-sh/dreamcast/>.  There is a
	  Dreamcast project is at <http://linuxdc.sourceforge.net/>.

config SH_CAT68701
	bool "CAT68701"

config SH_BIGSUR
	bool "BigSur"

config SH_SH2000
	bool "SH2000"
	select CPU_SUBTYPE_SH7709
	help
	  SH-2000 is a single-board computer based around SH7709A chip
	  intended for embedded applications.
	  It has an Ethernet interface (CS8900A), direct connected
	  Compact Flash socket, three serial ports and PC-104 bus.
	  More information at <http://sh2000.sh-linux.org>.

config SH_ADX
	bool "ADX"

config SH_MPC1211
	bool "Interface MPC1211"
	help
@@ -184,6 +165,13 @@ config SH_HS7751RVOIP
	  Select HS7751RVOIP if configuring for a Renesas Technology
	  Sales VoIP board.

config SH_7710VOIPGW
	bool "SH7710-VOIP-GW"
	select CPU_SUBTYPE_SH7710
	help
	  Select this option to build a kernel for the SH7710 based
	  VOIP GW.

config SH_RTS7751R2D
	bool "RTS7751R2D"
	select CPU_SUBTYPE_SH7751R
@@ -222,6 +210,12 @@ config SH_TITAN
	  Select Titan if you are configuring for a Nimble Microsystems
	  NetEngine NP51R.

config SH_SHMIN
	bool "SHMIN"
	select CPU_SUBTYPE_SH7706
	help
	  Select SHMIN if configureing for the SHMIN board

config SH_UNKNOWN
	bool "BareCPU"
	help
@@ -238,35 +232,9 @@ endchoice

source "arch/sh/mm/Kconfig"

config MEMORY_START
	hex "Physical memory start address"
	default "0x08000000"
	---help---
	  Computers built with Hitachi SuperH processors always
	  map the ROM starting at address zero.  But the processor
	  does not specify the range that RAM takes.

	  The physical memory (RAM) start address will be automatically
	  set to 08000000. Other platforms, such as the Solution Engine
	  boards typically map RAM at 0C000000.

	  Tweak this only when porting to a new machine which does not
	  already have a defconfig. Changing it from the known correct
	  value on any of the known systems will only lead to disaster.

config MEMORY_SIZE
	hex "Physical memory size"
	default "0x00400000"
	help
	  This sets the default memory size assumed by your SH kernel. It can
	  be overridden as normal by the 'mem=' argument on the kernel command
	  line. If unsure, consult your board specifications or just leave it
	  as 0x00400000 which was the default value before this became
	  configurable.

config CF_ENABLER
	bool "Compact Flash Enabler support"
	depends on SH_ADX || SH_SOLUTION_ENGINE || SH_UNKNOWN || SH_CAT68701 || SH_SH03
	depends on SH_SOLUTION_ENGINE || SH_UNKNOWN || SH_SH03
	---help---
	  Compact Flash is a small, removable mass storage device introduced
	  in 1994 originally as a PCMCIA device.  If you say `Y' here, you
@@ -294,7 +262,7 @@ config CF_AREA5
	  - "Area5" if CompactFlash is connected to Area 5 (0x14000000)
	  - "Area6" if it is connected to Area 6 (0x18000000)

	  "Area6" will work for most boards. For ADX, select "Area5".
	  "Area6" will work for most boards.

config CF_AREA6
	bool "Area6"
@@ -316,19 +284,6 @@ config CPU_LITTLE_ENDIAN
	  endian byte order. These modes require different kernels. Say Y if
	  your machine is little endian, N if it's a big endian machine.

# The SH7750 RTC module is disabled in the Dreamcast
config SH_RTC
	bool
	depends on !SH_DREAMCAST && !SH_SATURN && !SH_7300_SOLUTION_ENGINE && \
		   !SH_73180_SOLUTION_ENGINE && !SH_LANDISK && \
		   !SH_R7780RP
	default y
	help
	  Selecting this option will allow the Linux kernel to emulate
	  PC's RTC.

	  If unsure, say N.

config SH_FPU
	bool "FPU support"
	depends on !CPU_SH3
@@ -339,14 +294,22 @@ config SH_FPU

	  This option must be set in order to enable the FPU.

config SH_FPU_EMU
	bool "FPU emulation support"
	depends on !SH_FPU && EXPERIMENTAL
	default n
	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
	bool "DSP support"
	depends on !CPU_SH4
	default y
	default y if SH4AL_DSP || !CPU_SH4
	default n
	help
	  Selecting this option will enable support for SH processors that
	  have DSP units (ie, SH2-DSP and SH3-DSP). It is safe to say Y here
	  by default, as the existance of the DSP will be probed at runtime.
	  have DSP units (ie, SH2-DSP, SH3-DSP, and SH4AL-DSP).

	  This option must be set in order to enable the DSP.

@@ -373,6 +336,9 @@ config CPU_HAS_INTEVT
config CPU_HAS_PINT_IRQ
	bool

config CPU_HAS_MASKREG_IRQ
	bool

config CPU_HAS_INTC2_IRQ
	bool

@@ -400,16 +366,19 @@ config SH_TMU

endmenu

#source "arch/sh/boards/renesas/hs7751rvoip/Kconfig"
source "arch/sh/boards/renesas/hs7751rvoip/Kconfig"

source "arch/sh/boards/renesas/rts7751r2d/Kconfig"

#source "arch/sh/boards/renesas/rts7751r2d/Kconfig"
source "arch/sh/boards/renesas/r7780rp/Kconfig"

config SH_PCLK_FREQ
	int "Peripheral clock frequency (in Hz)"
	default "50000000" if CPU_SUBTYPE_SH7750 || CPU_SUBTYPE_SH7780
	default "60000000" if CPU_SUBTYPE_SH7751
	default "33333333" if CPU_SUBTYPE_SH7300 || CPU_SUBTYPE_SH7770 || CPU_SUBTYPE_SH7760
	default "27000000" if CPU_SUBTYPE_SH73180
	default "33333333" if CPU_SUBTYPE_SH7300 || CPU_SUBTYPE_SH7770 || \
			      CPU_SUBTYPE_SH7760
	default "27000000" if CPU_SUBTYPE_SH73180 || CPU_SUBTYPE_SH7343
	default "66000000" if CPU_SUBTYPE_SH4_202
	help
	  This option is used to specify the peripheral clock frequency.
@@ -440,10 +409,8 @@ source "arch/sh/cchips/Kconfig"

config HEARTBEAT
	bool "Heartbeat LED"
	depends on SH_MPC1211 || SH_SH03 || SH_CAT68701 || \
		   SH_STB1_HARP || SH_STB1_OVERDRIVE || SH_BIGSUR || \
		   SH_7751_SOLUTION_ENGINE || SH_7300_SOLUTION_ENGINE || \
		   SH_73180_SOLUTION_ENGINE || SH_SOLUTION_ENGINE || \
	depends on SH_MPC1211 || SH_SH03 || \
		   SH_BIGSUR || SOLUTION_ENGINE || \
		   SH_RTS7751R2D || SH_SH4202_MICRODEV || SH_LANDISK
	help
	  Use the power-on LED on your machine as a load meter.  The exact
@@ -459,6 +426,8 @@ config ISA_DMA_API

menu "Kernel features"

source kernel/Kconfig.hz

config KEXEC
	bool "kexec system call (EXPERIMENTAL)"
	depends on EXPERIMENTAL
@@ -476,10 +445,6 @@ config KEXEC
	  support.  As of this writing the exact hardware interface is
	  strongly in flux, so no good recommendation can be made.

config PREEMPT
	bool "Preemptible Kernel (EXPERIMENTAL)"
	depends on EXPERIMENTAL

config SMP
	bool "Symmetric multi-processing support"
	---help---
@@ -515,6 +480,8 @@ config NR_CPUS
	  This is purely to save memory - each supported CPU adds
	  approximately eight kilobytes to the kernel image.

source "kernel/Kconfig.preempt"

config CPU_HAS_SR_RB
	bool "CPU has SR.RB"
	depends on CPU_SH3 || CPU_SH4
@@ -636,6 +603,16 @@ source "fs/Kconfig.binfmt"

endmenu

menu "Power management options (EXPERIMENTAL)"
depends on EXPERIMENTAL

source kernel/power/Kconfig

config APM
	bool "Advanced Power Management Emulation"
	depends on PM
endmenu

source "net/Kconfig"

source "drivers/Kconfig"
+27 −9
Original line number Diff line number Diff line
@@ -30,8 +30,35 @@ config EARLY_PRINTK
	  when the kernel may crash or hang before the serial console is
	  initialised. If unsure, say N.

config DEBUG_STACKOVERFLOW
	bool "Check for stack overflows"
	depends on DEBUG_KERNEL
	help
	  This option will cause messages to be printed if free stack space
	  drops below a certain limit.

config DEBUG_STACK_USAGE
	bool "Stack utilization instrumentation"
	depends on DEBUG_KERNEL
	help
	  Enables the display of the minimum amount of free stack which each
	  task has ever had available in the sysrq-T and sysrq-P debug output.

	  This option will slow down process creation somewhat.

config 4KSTACKS
	bool "Use 4Kb for kernel stacks instead of 8Kb"
	depends on DEBUG_KERNEL
	help
	  If you say Y here the kernel will use a 4Kb stacksize for the
	  kernel stack attached to each process/thread. This facilitates
	  running more threads on a system and also reduces the pressure
	  on the VM subsystem for higher order allocations. This option
	  will also use IRQ stacks to compensate for the reduced stackspace.

config KGDB
	bool "Include KGDB kernel debugger"
	select FRAME_POINTER
	help
	  Include in-kernel hooks for kgdb, the Linux kernel source level
	  debugger.  See <http://kgdb.sourceforge.net/> for more information.
@@ -112,13 +139,4 @@ endchoice

endmenu

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
+18 −22
Original line number Diff line number Diff line
@@ -18,11 +18,13 @@ cflags-y := -mb
cflags-$(CONFIG_CPU_LITTLE_ENDIAN)	:= -ml

isa-y					:= any
isa-$(CONFIG_SH_DSP)			:= sh
isa-$(CONFIG_CPU_SH2)			:= sh2
isa-$(CONFIG_CPU_SH2A)			:= sh2a
isa-$(CONFIG_CPU_SH3)			:= sh3
isa-$(CONFIG_CPU_SH4)			:= sh4
isa-$(CONFIG_CPU_SH4A)			:= sh4a
isa-$(CONFIG_CPU_SH2A)			:= sh2a
isa-$(CONFIG_CPU_SH4AL_DSP)		:= sh4al

isa-$(CONFIG_SH_DSP)			:= $(isa-y)-dsp

@@ -30,9 +32,11 @@ ifndef CONFIG_MMU
isa-y			:= $(isa-y)-nommu
endif

ifndef CONFIG_SH_DSP
ifndef CONFIG_SH_FPU
isa-y			:= $(isa-y)-nofpu
endif
endif

cflags-y	+= $(call as-option,-Wa$(comma)-isa=$(isa-y),)

@@ -79,24 +83,19 @@ head-y := arch/sh/kernel/head.o arch/sh/kernel/init_task.o
LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)

core-y				+= arch/sh/kernel/ arch/sh/mm/
core-$(CONFIG_SH_FPU_EMU)	+= arch/sh/math-emu/

# Boards
machdir-$(CONFIG_SH_SOLUTION_ENGINE)		:= se/770x
machdir-$(CONFIG_SH_7751_SOLUTION_ENGINE)	:= se/7751
machdir-$(CONFIG_SH_7300_SOLUTION_ENGINE)	:= se/7300
machdir-$(CONFIG_SH_7343_SOLUTION_ENGINE)	:= se/7343
machdir-$(CONFIG_SH_73180_SOLUTION_ENGINE)	:= se/73180
machdir-$(CONFIG_SH_STB1_HARP)			:= harp
machdir-$(CONFIG_SH_STB1_OVERDRIVE)		:= overdrive
machdir-$(CONFIG_SH_HP6XX)			:= hp6xx
machdir-$(CONFIG_SH_CQREEK)			:= cqreek
machdir-$(CONFIG_SH_DMIDA)			:= dmida
machdir-$(CONFIG_SH_EC3104)			:= ec3104
machdir-$(CONFIG_SH_SATURN)			:= saturn
machdir-$(CONFIG_SH_DREAMCAST)			:= dreamcast
machdir-$(CONFIG_SH_CAT68701)			:= cat68701
machdir-$(CONFIG_SH_BIGSUR)			:= bigsur
machdir-$(CONFIG_SH_SH2000)			:= sh2000
machdir-$(CONFIG_SH_ADX)			:= adx
machdir-$(CONFIG_SH_MPC1211)			:= mpc1211
machdir-$(CONFIG_SH_SH03)			:= sh03
machdir-$(CONFIG_SH_SECUREEDGE5410)		:= snapgear
@@ -104,16 +103,16 @@ machdir-$(CONFIG_SH_HS7751RVOIP) := renesas/hs7751rvoip
machdir-$(CONFIG_SH_RTS7751R2D)			:= renesas/rts7751r2d
machdir-$(CONFIG_SH_7751_SYSTEMH)		:= renesas/systemh
machdir-$(CONFIG_SH_EDOSK7705)			:= renesas/edosk7705
machdir-$(CONFIG_SH_R7780RP)			:= renesas/r7780rp
machdir-$(CONFIG_SH_7710VOIPGW)			:= renesas/sh7710voipgw
machdir-$(CONFIG_SH_SH4202_MICRODEV)		:= superh/microdev
machdir-$(CONFIG_SH_LANDISK)			:= landisk
machdir-$(CONFIG_SH_TITAN)			:= titan
machdir-$(CONFIG_SH_SHMIN)			:= shmin
machdir-$(CONFIG_SH_UNKNOWN)			:= unknown

incdir-y			:= $(notdir $(machdir-y))

incdir-$(CONFIG_SH_SOLUTION_ENGINE)		:= se
incdir-$(CONFIG_SH_7751_SOLUTION_ENGINE)	:= se7751
incdir-$(CONFIG_SH_7300_SOLUTION_ENGINE)        := se7300
incdir-$(CONFIG_SH_73180_SOLUTION_ENGINE)	:= se73180
incdir-$(CONFIG_SH_HP600)			:= hp6xx
incdir-$(CONFIG_SH_HP6XX)			:= hp6xx

ifneq ($(machdir-y),)
core-y				+= arch/sh/boards/$(machdir-y)/
@@ -137,17 +136,14 @@ boot := arch/sh/boot

CPPFLAGS_vmlinux.lds := -traditional

ifneq ($(KBUILD_SRC),)
incdir-prefix	:= $(srctree)/include/asm-sh/
else
incdir-prefix	:=
endif

#	Update machine arch and proc symlinks if something which affects
#	them changed.  We use .arch and .mach to indicate when they were
#	updated last, otherwise make uses the target directory mtime.

include/asm-sh/.cpu: $(wildcard include/config/cpu/*.h) include/config/auto.conf
include/asm-sh/.cpu: $(wildcard include/config/cpu/*.h) \
		     include/config/auto.conf FORCE
	@echo '  SYMLINK include/asm-sh/cpu -> include/asm-sh/$(cpuincdir-y)'
	$(Q)if [ ! -d include/asm-sh ]; then mkdir -p include/asm-sh; fi
	$(Q)ln -fsn $(incdir-prefix)$(cpuincdir-y) include/asm-sh/cpu
@@ -157,7 +153,8 @@ include/asm-sh/.cpu: $(wildcard include/config/cpu/*.h) include/config/auto.conf
#	don't, just reference the parent directory so the semantics are
#	kept roughly the same.

include/asm-sh/.mach: $(wildcard include/config/sh/*.h) include/config/auto.conf
include/asm-sh/.mach: $(wildcard include/config/sh/*.h) \
		      include/config/auto.conf FORCE
	@echo -n '  SYMLINK include/asm-sh/mach -> '
	$(Q)if [ ! -d include/asm-sh ]; then mkdir -p include/asm-sh; fi
	$(Q)if [ -d $(incdir-prefix)$(incdir-y) ]; then \
@@ -170,7 +167,7 @@ include/asm-sh/.mach: $(wildcard include/config/sh/*.h) include/config/auto.conf
	fi
	@touch $@

archprepare: maketools include/asm-sh/.cpu include/asm-sh/.mach
archprepare: include/asm-sh/.cpu include/asm-sh/.mach maketools

PHONY += maketools FORCE
maketools:  include/linux/version.h FORCE
@@ -191,4 +188,3 @@ CLEAN_FILES += include/asm-sh/machtypes.h
define archhelp
	@echo '  zImage 	           - Compressed kernel image (arch/sh/boot/zImage)'
endef
Loading