linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] linux-2.6.0-test2 h8300 archtecure support update (1/6)
@ 2003-07-28 14:18 Yoshinori Sato
  2003-07-29 19:20 ` Sam Ravnborg
  0 siblings, 1 reply; 3+ messages in thread
From: Yoshinori Sato @ 2003-07-28 14:18 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux kernel Mailing List

config script fix
defconfig update
Makefile update
add H8S archtecture support

-- 
Yoshinori Sato
<ysato@users.sourceforge.jp>

diff -Nru linux-2.6.0-test2/arch/h8300/Kconfig linux-2.6.0-test2-h8300/arch/h8300/Kconfig
--- linux-2.6.0-test2/arch/h8300/Kconfig	2003-07-14 15:00:22.000000000 +0900
+++ linux-2.6.0-test2-h8300/arch/h8300/Kconfig	2003-07-28 12:40:08.000000000 +0900
@@ -29,6 +29,9 @@
 	bool
 	default n
 
+config ISA
+	bool
+	default y
 
 source "init/Kconfig"
 
@@ -67,6 +70,21 @@
 	  More Information.
 	  arch/h8300/Doc/simulator.txt
 
+config H8S_EDOSK2674
+	bool "EDOSK-2674"
+	help
+	  Renesas EDOSK-2674R Evalution Board Support
+	  More Information.
+	  <http://www.azpower.com/H8-uClinux/index.html>
+ 	  <http://www.eu.renesas.com/tools/edk/support/edosk2674.html>
+
+config H8S_SIM
+	bool "H8S Simulator"
+	help
+	  GDB Simulator Support
+	  More Information.
+	  arch/h8300/Doc/simulator.txt
+
 endchoice
 
 choice 
@@ -88,6 +106,10 @@
 	bool "H8/3065,3066,3067,3068,3069"
 	depends on (H8300H_GENERIC || H8300H_AKI3068NET || H8300H_H8MAX)
 
+config H8S2678
+	bool "H8S/2670,2673,2674R,2675,2676"
+	depends on (H8S_GENERIC || H8S_EDOSK2674 || H8S_SIM)
+
 endchoice
 
 config CPU_H8300H
@@ -95,12 +117,20 @@
 	depends on (H8300H_GENERIC || H8300H_AKI3068NET || H8300H_H8MAX || H8300H_SIM)
 	default y
 
+config CPU_H8S
+	bool
+	depends on (H8S_GENERIC || H8S_EDOSK2674 || H8S_SIM)
+	default y
+
 config CPU_CLOCK
 	int "CPU Clock Frequency (/1KHz)"	
 	default "20000" if H8300H_AKI3068NET
 	default "25000" if H8300H_H8MAX
 	default "16000" if H8300H_SIM
 	default "16000" if H8300H_GENERIC
+	default "33000" if H8S_GENERIC
+	default "33000" if H8S_SIM
+	default "33000" if H8S_EDOSK2674
 	help
 	  CPU Clock Frequency divide to 1000
 choice
@@ -121,15 +151,28 @@
 endchoice
 
 config DEFAULT_CMDLINE
-	bool
+	bool "Use buildin commandline"
+	default n
 	help
 	  buildin kernel commandline enabled.
 
 config KERNEL_COMMAND
-	string
+	string "Buildin commmand string"
+	depends on DEFAULT_CMDLINE
 	help
 	  buildin kernel commandline strings.
 
+config BLKDEV_RESERVE
+	bool "BLKDEV Reserved Memory"
+	default n
+	help
+	  Reserved BLKDEV area.
+
+config CONFIG_BLKDEV_RESERVE_ADDRESS
+	hex 'start address'
+	depends on BLKDEV_RESERVE
+	help
+	  BLKDEV start address.
 endmenu
 
 menu "Executable file formats"
@@ -153,43 +196,6 @@
 
 source "net/Kconfig"
 
-
-menu "Network device support"
-	depends on NET
-
-config NETDEVICES
-	bool "Network device support"
-	---help---
-	  You can say N here if you don't intend to connect your Linux box to
-	  any other computer at all or if all your connections will be over a
-	  telephone line with a modem either via UUCP (UUCP is a protocol to
-	  forward mail and news between unix hosts over telephone lines; read
-	  the UUCP-HOWTO, available from
-	  <http://www.tldp.org/docs.html#howto>) or dialing up a shell
-	  account or a BBS, even using term (term is a program which gives you
-	  almost full Internet connectivity if you have a regular dial up
-	  shell account on some Internet connected Unix computer. Read
-	  <http://www.bart.nl/~patrickr/term-howto/Term-HOWTO.html>).
-
-	  You'll have to say Y if your computer contains a network card that
-	  you want to use under Linux (make sure you know its name because you
-	  will be asked for it and read the Ethernet-HOWTO (especially if you
-	  plan to use more than one network card under Linux)) or if you want
-	  to use SLIP (Serial Line Internet Protocol is the protocol used to
-	  send Internet traffic over telephone lines or null modem cables) or
-	  CSLIP (compressed SLIP) or PPP (Point to Point Protocol, a better
-	  and newer replacement for SLIP) or PLIP (Parallel Line Internet
-	  Protocol is mainly used to create a mini network by connecting the
-	  parallel ports of two local machines) or AX.25/KISS (protocol for
-	  sending Internet traffic over amateur radio links).
-
-	  Make sure to read the NET-3-HOWTO. Eventually, you will have to read
-	  Olaf Kirch's excellent and free book "Network Administrator's
-	  Guide", to be found in <http://www.tldp.org/docs.html#guide>. If
-	  unsure, say Y.
-
-endmenu
-
 source "net/ax25/Kconfig"
 
 source "net/irda/Kconfig"
@@ -379,7 +385,7 @@
 
 config GDB_MAGICPRINT
 	bool "Message Output for GDB MagicPrint service"
-	depends on H8300H_SIM
+	depends on (H8300H_SIM || H8S_SIM)
 	help
 	  kernel messages output useing MagicPrint service from GDB
 
@@ -390,13 +396,13 @@
 
 config GDB_DEBUG
    	bool "Use gdb stub"
-	depends on !H8300H_SIM
+	depends on (!H8300H_SIM && H8S_SIM)
 	help
 	  gdb stub exception support
 
 config CONFIG_SH_STANDARD_BIOS
 	bool "Use gdb protocol serial console"
-	depends on !H8300H_SIM
+	depends on (!H8300H_SIM && H8S_SIM)
 	help
 	  serial console output using GDB protocol.
 	  Require eCos/RedBoot
diff -Nru linux-2.6.0-test2/arch/h8300/defconfig linux-2.6.0-test2-h8300/arch/h8300/defconfig
--- linux-2.6.0-test2/arch/h8300/defconfig	2003-07-14 15:00:22.000000000 +0900
+++ linux-2.6.0-test2-h8300/arch/h8300/defconfig	2003-07-14 15:17:52.000000000 +0900
@@ -7,6 +7,7 @@
 CONFIG_UID16=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+CONFIG_ISA=y
 
 #
 # Code maturity level options
@@ -20,7 +21,9 @@
 # CONFIG_BSD_PROCESS_ACCT is not set
 # CONFIG_SYSCTL is not set
 CONFIG_LOG_BUF_SHIFT=14
-# CONFIG_IKCONFIG is not set
+CONFIG_EMBEDDED=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
 
 #
 # Loadable module support
@@ -42,19 +45,76 @@
 CONFIG_CPU_CLOCK=16000
 # CONFIG_RAMKERNEL is not set
 CONFIG_ROMKERNEL=y
+# CONFIG_DEFAULT_CMDLINE is not set
 
 #
 # Executable file formats
 #
 CONFIG_KCORE_AOUT=y
 CONFIG_BINFMT_FLAT=y
+# CONFIG_BINFMT_ZFLAT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_CONCAT is not set
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_RAM=y
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_UCLINUX=y
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLKMTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC1000 is not set
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
 
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_XD is not set
 # CONFIG_BLK_DEV_LOOP is not set
 # CONFIG_BLK_DEV_RAM is not set
+# CONFIG_BLK_DEV_INITRD is not set
 
 #
 # ATA/IDE/MFM/RLL support
@@ -156,6 +216,8 @@
 # CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EFS_FS is not set
+# CONFIG_JFFS_FS is not set
+# CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
 # CONFIG_VXFS_FS is not set
 # CONFIG_HPFS_FS is not set
@@ -180,8 +242,8 @@
 # CONFIG_MAGIC_SYSRQ is not set
 # CONFIG_HIGHPROFILE is not set
 CONFIG_NO_KERNEL_MSG=y
-# CONFIG_GDB_MAGICPRINT is not set
-# CONFIG_SYSCALL_PRINT is not set
+CONFIG_GDB_MAGICPRINT=y
+CONFIG_SYSCALL_PRINT=y
 
 #
 # Security options
diff -Nru linux-2.6.0-test2/arch/h8300/vmlinux.lds.S linux-2.6.0-test2-h8300/arch/h8300/vmlinux.lds.S
--- linux-2.6.0-test2/arch/h8300/vmlinux.lds.S	2003-07-14 15:00:22.000000000 +0900
+++ linux-2.6.0-test2-h8300/arch/h8300/vmlinux.lds.S	2003-07-28 12:40:08.000000000 +0900
@@ -36,3 +36,143 @@
 #endif
 #endif
 
+#ifdef CONFIG_H8S_SIM
+#ifdef CONFIG_ROMKERNEL
+#include "platform/h8s/generic/rom.ld"
+#endif
+#ifdef CONFIG_RAMKERNEL
+#include "platform/h8s/generic/ram.ld"
+#endif
+#endif
+
+#ifdef CONFIG_H8S_EDOSK2674
+#ifdef CONFIG_ROMKERNEL
+#include "platform/h8s/edosk2674/rom.ld"
+#endif
+#ifdef CONFIG_RAMKERNEL
+#include "platform/h8s/edosk2674/ram.ld"
+#endif
+#endif
+
+_jiffies = _jiffies_64 + 4;
+
+SECTIONS
+{
+#if defined(CONFIG_ROMKERNEL)
+	.vectors :
+	{
+	__vector = . ;
+		*(.vectors*)
+	} > vector
+#endif
+#if defined(CONFIG_RAMKERNEL)
+	.bootvec :
+	{
+		*(.bootvec)
+	} > ram
+#endif
+        .text :
+	{
+#if defined(CONFIG_ROMKERNEL)
+		*(.int_redirect)
+#endif
+	__stext = . ;
+        	*(.text)
+	. = ALIGN(0x4) ;
+		*(.exit.text)
+		*(.text.*)
+	. = ALIGN(0x4) ;
+		*(.exitcall.exit)
+	. = ALIGN(0x4) ;
+		*(.kstrtab)
+	. = ALIGN(0x4) ;
+		*(.rodata*)
+	. = ALIGN(16);          /* Exception table              */
+	___start___ex_table = .;
+		*(__ex_table)
+	___stop___ex_table = .;
+
+        ___start___ksymtab = .;  /* Kernel symbol table          */
+		 *(__ksymtab)
+	___stop___ksymtab = .;
+
+	. = ALIGN(0x4) ;
+	__etext = . ;
+#if defined(CONFIG_ROMKERNEL)
+	} > rom
+#endif
+#if defined(CONFIG_RAMKERNEL)
+	} > ram
+#endif
+	.data : AT( ADDR(.text)+SIZEOF(.text))
+	{
+	__sdata = . ;
+	___data_start = . ;
+
+	. = ALIGN(0x2000) ;
+		*(.data.init_task)
+	. = ALIGN(0x4) ;
+		*(.data)
+	. = ALIGN(0x4) ;
+		*(.data.*)	
+
+	. = ALIGN(0x4) ;
+	___init_begin = .;
+	__sinittext = .; 
+		*(.init.text)
+	__einittext = .; 
+		*(.init.data)
+	. = ALIGN(0x4) ;
+	___setup_start = .;
+		*(.init.setup)
+	. = ALIGN(0x4) ;
+	___setup_end = .;
+	___start___param = .;
+		*(__param)
+	___stop___param = .;
+	___initcall_start = .;
+		*(.initcall1.init)
+		*(.initcall2.init)
+		*(.initcall3.init)
+		*(.initcall4.init)
+		*(.initcall5.init)
+		*(.initcall6.init)
+		*(.initcall7.init)
+	___initcall_end = .;
+	___con_initcall_start = .;
+		*(.con_initcall.init)
+	___con_initcall_end = .;
+		. = ALIGN(4);
+	___initramfs_start = .;
+  		*(.init.ramfs)
+  	___initramfs_end = .;
+	. = ALIGN(0x4) ;
+	___init_end = .;
+	__edata = . ;
+	} > ram
+	__begin_data = LOADADDR(.data) ;
+#if defined(CONFIG_ROMKERNEL)
+	.erom :
+	{
+	__erom = . ;
+	} > erom
+#endif
+        .bss : 
+        {
+	. = ALIGN(0x4) ;
+	__sbss = . ;
+		*(.bss*)
+	. = ALIGN(0x4) ;
+		*(COMMON)
+	. = ALIGN(0x4) ;
+	__ebss = . ;
+	__end = . ;
+	__ramstart = .;
+	} > ram
+        .dummy :
+        {
+	COMMAND_START = . - 0x200 ;
+	__ramend = . ;
+	} > eram
+}
+
diff -Nru linux-2.6.0-test2/arch/h8300/Makefile linux-2.6.0-test2-h8300/arch/h8300/Makefile
--- linux-2.6.0-test2/arch/h8300/Makefile	2003-07-28 10:31:02.000000000 +0900
+++ linux-2.6.0-test2-h8300/arch/h8300/Makefile	2003-07-28 12:40:08.000000000 +0900
@@ -12,33 +12,40 @@
 endif
 
 platform-$(CONFIG_CPU_H8300H)	:= h8300h
+platform-$(CONFIG_CPU_H8S)	:= h8s
 PLATFORM := $(platform-y)
 
 board-$(CONFIG_H8300H_GENERIC)		:= generic
-board-$(CONFIG_H8300H_AKI3068NET)	:= ucsimm
-board-$(CONFIG_H8300H_H8MAX)		:= ucdimm
+board-$(CONFIG_H8300H_AKI3068NET)	:= aki3068net
+board-$(CONFIG_H8300H_H8MAX)		:= h8max
 board-$(CONFIG_H8300H_SIM)		:= generic
+board-$(CONFIG_H8S_GENERIC)		:= generic
+board-$(CONFIG_H8S_EDOSK2674)		:= edosk2674
+board-$(CONFIG_H8S_SIM)			:= generic
 BOARD := $(board-y)
 
 model-$(CONFIG_RAMKERNEL)	:= ram
 model-$(CONFIG_ROMKERNEL)	:= rom
 MODEL := $(model-y)
 
-cflags-$(CONFIG_CPU_H8300H)		:= -mh
+cflags-$(CONFIG_CPU_H8300H)	:= -mh
 ldflags-$(CONFIG_CPU_H8300H)	:= -mh8300helf
+cflags-$(CONFIG_CPU_H8S)	:= -ms
+ldflags-$(CONFIG_CPU_H8S)	:= -mh8300self
 
 CFLAGS += $(cflags-y)
-CFLAGS += -mint32 -fno-builtin
-CFLAGS += -O2 -g
+CFLAGS += -mint32 -fno-builtin -Os
+CFLAGS += -g
 CFLAGS += -D__linux__
 CFLAGS += -DUTS_SYSNAME=\"uClinux\" -DTARGET=$(BOARD)
 AFLAGS += -DPLATFORM=$(PLATFORM) -DTARGET=$(BOARD) -DMODEL=$(MODEL) $(cflags-y)
 LDFLAGS += $(ldflags-y)
 
 CROSS_COMPILE = h8300-elf-
-#HEAD := arch/$(ARCH)/platform/$(platform-y)/$(board-y)/crt0_$(model-y).o
 LIBGCC := $(shell $(CROSS-COMPILE)$(CC) $(CFLAGS) -print-libgcc-file-name)
 
+head-y := arch/$(ARCH)/platform/$(platform-y)/$(board-y)/crt0_$(model-y).o
+
 core-y	+= arch/$(ARCH)/kernel/ \
 	   arch/$(ARCH)/mm/ \
 	   arch/$(ARCH)/platform/$(PLATFORM)/ \
@@ -58,3 +65,16 @@
 include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.s \
 				   include/asm include/linux/version.h
 	$(call filechk,gen-asm-offsets)
+
+vmlinux.bin: vmlinux
+	$(OBJCOPY) -Obinary $< $@
+
+vmlinux.srec: vmlinux
+	$(OBJCOPY) -Osrec $< $@
+
+define archhelp
+  echo  'vmlinux.bin  - Create raw binary'
+  echo  'vmlinux.srec - Create srec binary'
+endef
+
+CLEAN_FILES += arch/$(ARCH)/vmlinux.bin arch/$(ARCH)/vmlinux.srec

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] linux-2.6.0-test2 h8300 archtecure support update (1/6)
  2003-07-28 14:18 [PATCH] linux-2.6.0-test2 h8300 archtecure support update (1/6) Yoshinori Sato
@ 2003-07-29 19:20 ` Sam Ravnborg
  2003-07-30 12:20   ` Yoshinori Sato
  0 siblings, 1 reply; 3+ messages in thread
From: Sam Ravnborg @ 2003-07-29 19:20 UTC (permalink / raw)
  To: Yoshinori Sato; +Cc: Linus Torvalds, linux kernel Mailing List

On Mon, Jul 28, 2003 at 11:18:23PM +0900, Yoshinori Sato wrote:
>  BOARD := $(board-y)

There is no need for renaming this variable, it is only reference three
times, so board-y would be fine.
Same goes for MODEL.

> +
> +vmlinux.bin: vmlinux
> +	$(OBJCOPY) -Obinary $< $@
> +
> +vmlinux.srec: vmlinux
> +	$(OBJCOPY) -Osrec $< $@
The above is more suited for a seperate boot/ directory.

Example:
boot := arch/$(ARCH)/boot
vmlinux.srec vmlinux.bin: vmlinux
	$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@

archclean:
	$(Q)$(MAKE) $(clean)=$(boot)

(The current archclean rule is plain wrong).


And in boot/Makefile

OBJCOPYFLAGS_vmlinux.srec := -Osrec
OBJCOPYFLAGS_vmlinux.bin  := -Obinary
$(obj)/vmlinux.srec $(obj)/vmlinux.bin: vmlinux FORCE
	$(call if_changed,objcopy)
	@echo '  Kernel: $@ is ready'

targets += vmlinux.srec vmlinux.bin


> +
> +define archhelp
> +  echo  'vmlinux.bin  - Create raw binary'
> +  echo  'vmlinux.srec - Create srec binary'
> +endef
OK - shall stay in arch/$(ARCH)/Makefile

> +
> +CLEAN_FILES += arch/$(ARCH)/vmlinux.bin arch/$(ARCH)/vmlinux.srec

Replaced by targets assignment in boot/Makefile.
But you shall add files related to asm-offsets:
CLEAN_FILES += include/asm-$(ARCH)/asm-offsets.h

	Sam

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] linux-2.6.0-test2 h8300 archtecure support update (1/6)
  2003-07-29 19:20 ` Sam Ravnborg
@ 2003-07-30 12:20   ` Yoshinori Sato
  0 siblings, 0 replies; 3+ messages in thread
From: Yoshinori Sato @ 2003-07-30 12:20 UTC (permalink / raw)
  To: sam; +Cc: linux kernel Mailing List

At Tue, 29 Jul 2003 21:20:56 +0200,
Sam Ravnborg wrote:
> 
> On Mon, Jul 28, 2003 at 11:18:23PM +0900, Yoshinori Sato wrote:
> >  BOARD := $(board-y)
> 
> There is no need for renaming this variable, it is only reference three
> times, so board-y would be fine.
> Same goes for MODEL.

Because use MODEL by selection of rom/ram, cannot use it with this intended use. 
Do not need to see it outside, I mean if there is not a problem.

> > +
> > +vmlinux.bin: vmlinux
> > +	$(OBJCOPY) -Obinary $< $@
> > +
> > +vmlinux.srec: vmlinux
> > +	$(OBJCOPY) -Osrec $< $@
> The above is more suited for a seperate boot/ directory.
> 
> Example:
> boot := arch/$(ARCH)/boot
> vmlinux.srec vmlinux.bin: vmlinux
> 	$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
> 
> archclean:
> 	$(Q)$(MAKE) $(clean)=$(boot)
> 
> (The current archclean rule is plain wrong).
> 
> 
> And in boot/Makefile
> 
> OBJCOPYFLAGS_vmlinux.srec := -Osrec
> OBJCOPYFLAGS_vmlinux.bin  := -Obinary
> $(obj)/vmlinux.srec $(obj)/vmlinux.bin: vmlinux FORCE
> 	$(call if_changed,objcopy)
> 	@echo '  Kernel: $@ is ready'
> 
> targets += vmlinux.srec vmlinux.bin
> 
> 
> > +
> > +define archhelp
> > +  echo  'vmlinux.bin  - Create raw binary'
> > +  echo  'vmlinux.srec - Create srec binary'
> > +endef
> OK - shall stay in arch/$(ARCH)/Makefile
> 
> > +
> > +CLEAN_FILES += arch/$(ARCH)/vmlinux.bin arch/$(ARCH)/vmlinux.srec
> 
> Replaced by targets assignment in boot/Makefile.
> But you shall add files related to asm-offsets:
> CLEAN_FILES += include/asm-$(ARCH)/asm-offsets.h
> 
> 	Sam

fixed.
thank you.

-- 
Yoshinori Sato
<ysato@users.sourceforge.jp>

diff -Nru linux-2.6.0-test2-h8300/arch/h8300/Makefile linux-2.6.0-test2-h8300-makefix/arch/h8300/Makefile
--- linux-2.6.0-test2-h8300/arch/h8300/Makefile	2003-07-28 12:40:08.000000000 +0900
+++ linux-2.6.0-test2-h8300-makefix/arch/h8300/Makefile	2003-07-30 18:42:25.000000000 +0900
@@ -5,7 +5,7 @@
 # License.  See the file "COPYING" in the main directory of this archive
 # for more details.
 #
-# (C) Copyright 2002, Yoshinori Sato <ysato@users.sourceforge.jp>
+# (C) Copyright 2002,2003 Yoshinori Sato <ysato@users.sourceforge.jp>
 #
 ifndef include-config
 -include $(TOPDIR)/.config
@@ -37,8 +37,8 @@
 CFLAGS += -mint32 -fno-builtin -Os
 CFLAGS += -g
 CFLAGS += -D__linux__
-CFLAGS += -DUTS_SYSNAME=\"uClinux\" -DTARGET=$(BOARD)
-AFLAGS += -DPLATFORM=$(PLATFORM) -DTARGET=$(BOARD) -DMODEL=$(MODEL) $(cflags-y)
+CFLAGS += -DUTS_SYSNAME=\"uClinux\"
+AFLAGS += -DPLATFORM=$(PLATFORM) -DMODEL=$(MODEL) $(cflags-y)
 LDFLAGS += $(ldflags-y)
 
 CROSS_COMPILE = h8300-elf-
@@ -53,28 +53,32 @@
 
 libs-y	+= arch/$(ARCH)/lib/ $(LIBGCC)
 
-export MODEL
+boot := arch/h8300/boot
+
+export MODEL PLATFORM
 
 archmrproper:
 
 archclean:
-	$(call descend arch/$(ARCH), subdirclean)
+	$(Q)$(MAKE) $(clean)=$(boot)
+
+prepare: include/asm-$(ARCH)/machine-depend.h include/asm-$(ARCH)/asm-offsets.h
 
-prepare: include/asm-$(ARCH)/asm-offsets.h
+include/asm-$(ARCH)/machine-depend.h: include/asm-$(ARCH)/$(BOARD)/machine-depend.h
+	$(Q)ln -sf $(BOARD)/machine-depend.h \
+                   include/asm-$(ARCH)/machine-depend.h
+	@echo '  Create include/asm-$(ARCH)/machine-depend.h'
 
 include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.s \
 				   include/asm include/linux/version.h
 	$(call filechk,gen-asm-offsets)
 
-vmlinux.bin: vmlinux
-	$(OBJCOPY) -Obinary $< $@
-
-vmlinux.srec: vmlinux
-	$(OBJCOPY) -Osrec $< $@
+vmlinux.srec vmlinux.bin: vmlinux
+	$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
 
 define archhelp
   echo  'vmlinux.bin  - Create raw binary'
   echo  'vmlinux.srec - Create srec binary'
 endef
 
-CLEAN_FILES += arch/$(ARCH)/vmlinux.bin arch/$(ARCH)/vmlinux.srec
+CLEAN_FILES += include/asm-$(ARCH)/asm-offsets.h include/asm-$(ARCH)/machine-depend.h
diff -Nru linux-2.6.0-test2-h8300/arch/h8300/boot/Makefile linux-2.6.0-test2-h8300-makefix/arch/h8300/boot/Makefile
--- linux-2.6.0-test2-h8300/arch/h8300/boot/Makefile	1970-01-01 09:00:00.000000000 +0900
+++ linux-2.6.0-test2-h8300-makefix/arch/h8300/boot/Makefile	2003-07-30 19:35:31.000000000 +0900
@@ -0,0 +1,12 @@
+# arch/h8300/boot/Makefile
+
+targets := vmlinux.srec vmlinux.bin
+
+OBCOPYFLAGS_vmlinux.srec := -Osrec
+OBCOPYFLAGS_vmlinux.bin  := -Obin
+
+$(obj)/vmlinux.srec $(obj)/vmlinux.bin:  vmlinux FORCE
+	$(call if_changed,objcopy)
+	@echo '  Kernel: $@ is ready'
+
+CLEAN_FILES += arch/$(ARCH)/vmlinux.bin arch/$(ARCH)/vmlinux.srec
diff -Nru linux-2.6.0-test2-h8300/include/asm-h8300/aki3068net/machine-depend.h linux-2.6.0-test2-h8300-makefix/include/asm-h8300/aki3068net/machine-depend.h
--- linux-2.6.0-test2-h8300/include/asm-h8300/aki3068net/machine-depend.h	1970-01-01 09:00:00.000000000 +0900
+++ linux-2.6.0-test2-h8300-makefix/include/asm-h8300/aki3068net/machine-depend.h	2003-07-30 18:42:26.000000000 +0900
@@ -0,0 +1,35 @@
+/* AE-3068 board depend header */
+
+/* TIMER rate define */
+#ifdef H8300_TIMER_DEFINE
+#include <linux/config.h>
+#define H8300_TIMER_COUNT_DATA 20000*10/8192
+#define H8300_TIMER_FREQ 20000*1000/8192
+#endif
+
+/* AE-3068 RTL8019AS Config */
+#ifdef H8300_NE_DEFINE
+
+#define NE2000_ADDR		0x200000
+#define NE2000_IRQ              5
+#define NE2000_IRQ_VECTOR	(12 + NE2000_IRQ)
+#define	NE2000_BYTE		volatile unsigned short
+
+#define IER                     0xfee015
+#define ISR			0xfee016
+#define IRQ_MASK		(1 << NE2000_IRQ)
+
+#define WCRL                    0xfee023
+#define MAR0A                   0xffff20
+#define ETCR0A                  0xffff24
+#define DTCR0A                  0xffff27
+#define MAR0B                   0xffff28
+#define DTCR0B                  0xffff2f
+
+#define H8300_INIT_NE()                  \
+do {                                     \
+	wordlength = 1;                  \
+        outb_p(0x48, ioaddr + EN0_DCFG); \
+} while(0)
+
+#endif
diff -Nru linux-2.6.0-test2-h8300/include/asm-h8300/aki3068net/ne.h linux-2.6.0-test2-h8300-makefix/include/asm-h8300/aki3068net/ne.h
--- linux-2.6.0-test2-h8300/include/asm-h8300/aki3068net/ne.h	2003-07-19 21:41:33.000000000 +0900
+++ linux-2.6.0-test2-h8300-makefix/include/asm-h8300/aki3068net/ne.h	1970-01-01 09:00:00.000000000 +0900
@@ -1,28 +0,0 @@
-/* AE-3068 (aka. aki3068net) RTL8019AS Config */
-
-#ifndef __H8300_AKI3068NET_NE__
-#define __H8300_AKI3068NET_NE__
-
-#define NE2000_ADDR		0x200000
-#define NE2000_IRQ              5
-#define NE2000_IRQ_VECTOR	(12 + NE2000_IRQ)
-#define	NE2000_BYTE		volatile unsigned short
-
-#define IER                     0xfee015
-#define ISR			0xfee016
-#define IRQ_MASK		(1 << NE2000_IRQ)
-
-#define WCRL                    0xfee023
-#define MAR0A                   0xffff20
-#define ETCR0A                  0xffff24
-#define DTCR0A                  0xffff27
-#define MAR0B                   0xffff28
-#define DTCR0B                  0xffff2f
-
-#define H8300_INIT_NE()                  \
-do {                                     \
-	wordlength = 1;                  \
-        outb_p(0x48, ioaddr + EN0_DCFG); \
-} while(0)
-
-#endif
diff -Nru linux-2.6.0-test2-h8300/include/asm-h8300/aki3068net/timer_rate.h linux-2.6.0-test2-h8300-makefix/include/asm-h8300/aki3068net/timer_rate.h
--- linux-2.6.0-test2-h8300/include/asm-h8300/aki3068net/timer_rate.h	2003-07-20 01:19:25.000000000 +0900
+++ linux-2.6.0-test2-h8300-makefix/include/asm-h8300/aki3068net/timer_rate.h	1970-01-01 09:00:00.000000000 +0900
@@ -1,9 +0,0 @@
-#ifndef __H8300_AKI3068NET_TIMER_RATE__
-#define __H8300_AKI3068NET_TIMER_RATE__
-
-#include <linux/config.h>
-
-#define H8300_TIMER_COUNT_DATA CONFIG_CPU_CLOCK*10/8192
-#define H8300_TIMER_FREQ CONFIG_CPU_CLOCK*1000/8192
-
-#endif
diff -Nru linux-2.6.0-test2-h8300/include/asm-h8300/edosk2674/machine-depend.h linux-2.6.0-test2-h8300-makefix/include/asm-h8300/edosk2674/machine-depend.h
--- linux-2.6.0-test2-h8300/include/asm-h8300/edosk2674/machine-depend.h	1970-01-01 09:00:00.000000000 +0900
+++ linux-2.6.0-test2-h8300-makefix/include/asm-h8300/edosk2674/machine-depend.h	2003-07-30 18:42:26.000000000 +0900
@@ -0,0 +1,70 @@
+/* EDOSK2674 board depend header */
+
+/* TIMER rate define */
+#ifdef H8300_TIMER_DEFINE
+#define H8300_TIMER_COUNT_DATA 33000*10/8192
+#define H8300_TIMER_FREQ 33000*1000/8192
+#endif
+
+/* EDOSK-2674R SMSC Network Controler Target Depend impliments */
+#ifdef H8300_SMSC_DEFINE
+
+#define SMSC_BASE 0xf80000
+#define SMSC_IRQ 16
+
+/* sorry quick hack */
+#if defined(outw)
+# undef outw
+#endif
+#define outw(d,a) edosk2674_smsc_outw(d,(volatile unsigned short *)(a))
+#if defined(inw)
+# undef inw
+#endif
+#define inw(a) edosk2674_smsc_inw((volatile unsigned short *)(a))
+#if defined(outsw)
+# undef outsw
+#endif
+#define outsw(a,p,l) edosk2674_smsc_outsw((volatile unsigned short *)(a),p,l)
+#if defined(insw)
+# undef insw
+#endif
+#define insw(a,p,l) edosk2674_smsc_insw((volatile unsigned short *)(a),p,l)
+
+static inline void edosk2674_smsc_outw(
+	unsigned short d,
+	volatile unsigned short *a
+	)
+{
+	*a = (d >> 8) | (d << 8);
+}
+
+static inline unsigned short edosk2674_smsc_inw(
+	volatile unsigned short *a
+	)
+{
+	unsigned short d;
+	d = *a;
+	return (d >> 8) | (d << 8);
+}
+
+static inline void edosk2674_smsc_outsw(
+	volatile unsigned short *a,
+	unsigned short *p,
+	unsigned long l
+	)
+{
+	for (; l != 0; --l, p++)
+		*a = *p;
+}
+
+static inline void edosk2674_smsc_insw(
+	volatile unsigned short *a,
+	unsigned short *p,
+	unsigned long l
+	)
+{
+	for (; l != 0; --l, p++)
+		*p = *a;
+}
+
+#endif
diff -Nru linux-2.6.0-test2-h8300/include/asm-h8300/edosk2674/timer_rate.h linux-2.6.0-test2-h8300-makefix/include/asm-h8300/edosk2674/timer_rate.h
--- linux-2.6.0-test2-h8300/include/asm-h8300/edosk2674/timer_rate.h	2003-07-20 01:18:09.000000000 +0900
+++ linux-2.6.0-test2-h8300-makefix/include/asm-h8300/edosk2674/timer_rate.h	1970-01-01 09:00:00.000000000 +0900
@@ -1,4 +0,0 @@
-#include <linux/config.h>
-
-#define H8300_TIMER_COUNT_DATA CONFIG_CPU_CLOCK*10/8192
-#define H8300_TIMER_FREQ CONFIG_CPU_CLOCK*1000/8192
diff -Nru linux-2.6.0-test2-h8300/include/asm-h8300/generic/machine-depend.h linux-2.6.0-test2-h8300-makefix/include/asm-h8300/generic/machine-depend.h
--- linux-2.6.0-test2-h8300/include/asm-h8300/generic/machine-depend.h	1970-01-01 09:00:00.000000000 +0900
+++ linux-2.6.0-test2-h8300-makefix/include/asm-h8300/generic/machine-depend.h	2003-07-30 18:42:26.000000000 +0900
@@ -0,0 +1,17 @@
+/* machine depend header */
+
+/* TIMER rate define */
+#ifdef H8300_TIMER_DEFINE
+#include <linux/config.h>
+#if defined(CONFIG_H83007) || defined(CONFIG_H83068) || defined(CONFIG_H8S2678)
+#define H8300_TIMER_COUNT_DATA CONFIG_CPU_CLOCK*10/8192
+#define H8300_TIMER_FREQ CONFIG_CPU_CLOCK*1000/8192
+#endif
+
+#if defined(CONFIG_H8_3002) || defined(CONFIG_H83048)
+#define H8300_TIMER_COUNT_DATA  CONFIG_CPU_CLOCK*10/8
+#define H8300_TIMER_FREQ CONFIG_CPU_CLOCK*1000/8
+#endif
+
+#endif
+
diff -Nru linux-2.6.0-test2-h8300/include/asm-h8300/generic/timer_rate.h linux-2.6.0-test2-h8300-makefix/include/asm-h8300/generic/timer_rate.h
--- linux-2.6.0-test2-h8300/include/asm-h8300/generic/timer_rate.h	2003-07-19 21:41:33.000000000 +0900
+++ linux-2.6.0-test2-h8300-makefix/include/asm-h8300/generic/timer_rate.h	1970-01-01 09:00:00.000000000 +0900
@@ -1,15 +0,0 @@
-#include <linux/config.h>
-
-#if defined(CONFIG_H83007) || defined(CONFIG_H83068) || defined(CONFIG_H8S2678)
-#define H8300_TIMER_COUNT_DATA CONFIG_CPU_CLOCK*10/8192
-#define H8300_TIMER_FREQ CONFIG_CPU_CLOCK*1000/8192
-#endif
-
-#if defined(H8_3002) || defined(CONFIG_H83048)
-#define H8300_TIMER_COUNT_DATA  CONFIG_CPU_CLOCK*10/8
-#define H8300_TIMER_FREQ CONFIG_CPU_CLOCK*1000/8
-#endif
-
-#if !defined(H8300_TIMER_COUNT_DATA)
-#error illigal configuration
-#endif
diff -Nru linux-2.6.0-test2-h8300/include/asm-h8300/h8300_ne.h linux-2.6.0-test2-h8300-makefix/include/asm-h8300/h8300_ne.h
--- linux-2.6.0-test2-h8300/include/asm-h8300/h8300_ne.h	2003-07-14 15:04:49.000000000 +0900
+++ linux-2.6.0-test2-h8300-makefix/include/asm-h8300/h8300_ne.h	2003-07-30 17:41:06.000000000 +0900
@@ -11,9 +11,9 @@
 #define	h8300ne_h
 /****************************************************************************/
 
-/* Such a description is OK ? */
-#define DEPEND_HEADER(target) <asm/target/ne.h> 
-#include DEPEND_HEADER(TARGET)
+#define H8300_NE_DEFINE
+#include <asm/machine-depend.h>
+#undef  H8300_NE_DEFINE
 
 /****************************************************************************/
 #endif	/* h8300ne_h */
diff -Nru linux-2.6.0-test2-h8300/include/asm-h8300/h8max/ide.h linux-2.6.0-test2-h8300-makefix/include/asm-h8300/h8max/ide.h
--- linux-2.6.0-test2-h8300/include/asm-h8300/h8max/ide.h	2003-07-14 15:04:49.000000000 +0900
+++ linux-2.6.0-test2-h8300-makefix/include/asm-h8300/h8max/ide.h	1970-01-01 09:00:00.000000000 +0900
@@ -1,60 +0,0 @@
-/* H8MAX IDE I/F Config */
-
-#define H8300_IDE_BASE 0x200000
-#define H8300_IDE_CTRL 0x60000c
-#define H8300_IDE_IRQ  5
-#define H8300_IDE_REG_OFFSET 2
-
-#undef outb
-#undef inb
-#undef outb_p
-#undef inb_p
-#undef outsw
-#undef insw
-
-#define outb(d,a) h8max_outb(d,(unsigned short *)a)
-#define inb(a) h8max_inb((unsigned char *)a)
-#define outb_p(d,a) h8max_outb(d,(unsigned short *)a)
-#define inb_p(a) h8max_inb((unsigned char *)a)
-#define outsw(addr,buf,len) h8max_outsw(addr,buf,len);
-#define insw(addr,buf,len) h8max_insw(addr,buf,len);
-
-static inline void h8max_outb(unsigned short d,unsigned short *a)
-{
-	*a = d;
-}
-
-static inline unsigned char h8max_inb(unsigned char *a)
-{
-	return *(a+1);
-}
-
-static inline void h8max_outsw(void *addr, void *buf, int len)
-{
-	unsigned volatile short *ap = (unsigned volatile short *)addr;
-	unsigned short *bp = (unsigned short *)buf;
-	unsigned short d;
-	while(len--) {
-		d = *bp++;
-		*ap = (d >> 8) | (d << 8);
-	}
-}
-
-static inline void h8max_insw(void *addr, void *buf, int len)
-{
-	unsigned volatile short *ap = (unsigned volatile short *)addr;
-	unsigned short *bp = (unsigned short *)buf;
-	unsigned short d;
-	while(len--) {
-		d = *ap;
-		*bp++ = (d >> 8) | (d << 8);
-	}
-}
-
-static inline void target_ide_fix_driveid(struct hd_driveid *id)
-{
-	int c;
-	unsigned short *p = (unsigned short *)id;
-	for (c = 0; c < SECTOR_WORDS; c++, p++)
-		*p = (*p >> 8) | (*p << 8);
-}
diff -Nru linux-2.6.0-test2-h8300/include/asm-h8300/h8max/machine-depend.h linux-2.6.0-test2-h8300-makefix/include/asm-h8300/h8max/machine-depend.h
--- linux-2.6.0-test2-h8300/include/asm-h8300/h8max/machine-depend.h	1970-01-01 09:00:00.000000000 +0900
+++ linux-2.6.0-test2-h8300-makefix/include/asm-h8300/h8max/machine-depend.h	2003-07-30 18:42:26.000000000 +0900
@@ -0,0 +1,167 @@
+/* H8MAX board depend header */
+
+/* TIMER rate define */
+#ifdef H8300_TIMER_DEFINE
+#define H8300_TIMER_COUNT_DATA 25000*10/8192
+#define H8300_TIMER_FREQ 25000*1000/8192
+#endif
+
+/* H8MAX RTL8019AS Config */
+#ifdef H8300_NE_DEFINE
+
+#define NE2000_ADDR		0x800600
+#define NE2000_IRQ              4
+#define NE2000_IRQ_VECTOR	(12 + NE2000_IRQ)
+#define	NE2000_BYTE		volatile unsigned short
+
+#define IER                     0xfee015
+#define ISR			0xfee016
+#define IRQ_MASK		(1 << NE2000_IRQ)
+/* sorry quick hack */
+#if defined(outb)
+# undef outb
+#endif
+#define outb(d,a)               h8max_outb((d),(a) - NE2000_ADDR)
+#if defined(inb)
+# undef inb
+#endif
+#define inb(a)                  h8max_inb((a) - NE2000_ADDR)
+#if defined(outb_p)
+# undef outb_p
+#endif
+#define outb_p(d,a)             h8max_outb((d),(a) - NE2000_ADDR)
+#if defined(inb_p)
+# undef inb_p
+#endif
+#define inb_p(a)                h8max_inb((a) - NE2000_ADDR)
+#if defined(outsw)
+# undef outsw
+#endif
+#define outsw(a,p,l)            h8max_outsw((a) - NE2000_ADDR,(unsigned short *)p,l)
+#if defined(insw)
+# undef insw
+#endif
+#define insw(a,p,l)             h8max_insw((a) - NE2000_ADDR,(unsigned short *)p,l)
+#if defined(outsb)
+# undef outsb
+#endif
+#define outsb(a,p,l)            h8max_outsb((a) - NE2000_ADDR,(unsigned char *)p,l)
+#if defined(insb)
+# undef insb
+#endif
+#define insb(a,p,l)             h8max_insb((a) - NE2000_ADDR,(unsigned char *)p,l)
+
+#define H8300_INIT_NE()                  \
+do {                                     \
+	wordlength = 2;                  \
+	h8max_outb(0x49, ioaddr + EN0_DCFG); \
+	SA_prom[14] = SA_prom[15] = 0x57;\
+} while(0)
+
+static inline void h8max_outb(unsigned char d,unsigned char a)
+{
+	*(unsigned short *)(NE2000_ADDR + (a << 1)) = d;
+}
+
+static inline unsigned char h8max_inb(unsigned char a)
+{
+	return *(unsigned char *)(NE2000_ADDR + (a << 1) +1);
+}
+
+static inline void h8max_outsw(unsigned char a,unsigned short *p,unsigned long l)
+{
+	unsigned short d;
+	for (; l != 0; --l, p++) {
+		d = (((*p) >> 8) & 0xff) | ((*p) << 8);
+		*(unsigned short *)(NE2000_ADDR + (a << 1)) = d;
+	}
+}
+
+static inline void h8max_insw(unsigned char a,unsigned short *p,unsigned long l)
+{
+	unsigned short d;
+	for (; l != 0; --l, p++) {
+		d = *(unsigned short *)(NE2000_ADDR + (a << 1));
+		*p = (d << 8)|((d >> 8) & 0xff);
+	}
+}
+
+static inline void h8max_outsb(unsigned char a,unsigned char *p,unsigned long l)
+{
+	for (; l != 0; --l, p++) {
+		*(unsigned short *)(NE2000_ADDR + (a << 1)) = *p;
+	}
+}
+
+static inline void h8max_insb(unsigned char a,unsigned char *p,unsigned long l)
+{
+	for (; l != 0; --l, p++) {
+		*p = *((unsigned char *)(NE2000_ADDR + (a << 1))+1);
+	}
+}
+
+#endif
+
+/* H8MAX IDE I/F Config */
+#ifdef H8300_IDE_DEFINE
+
+#define H8300_IDE_BASE 0x200000
+#define H8300_IDE_CTRL 0x60000c
+#define H8300_IDE_IRQ  5
+#define H8300_IDE_REG_OFFSET 2
+
+#undef outb
+#undef inb
+#undef outb_p
+#undef inb_p
+#undef outsw
+#undef insw
+
+#define outb(d,a) h8max_outb(d,(unsigned short *)a)
+#define inb(a) h8max_inb((unsigned char *)a)
+#define outb_p(d,a) h8max_outb(d,(unsigned short *)a)
+#define inb_p(a) h8max_inb((unsigned char *)a)
+#define outsw(addr,buf,len) h8max_outsw(addr,buf,len);
+#define insw(addr,buf,len) h8max_insw(addr,buf,len);
+
+static inline void h8max_outb(unsigned short d,unsigned short *a)
+{
+	*a = d;
+}
+
+static inline unsigned char h8max_inb(unsigned char *a)
+{
+	return *(a+1);
+}
+
+static inline void h8max_outsw(void *addr, void *buf, int len)
+{
+	unsigned volatile short *ap = (unsigned volatile short *)addr;
+	unsigned short *bp = (unsigned short *)buf;
+	unsigned short d;
+	while(len--) {
+		d = *bp++;
+		*ap = (d >> 8) | (d << 8);
+	}
+}
+
+static inline void h8max_insw(void *addr, void *buf, int len)
+{
+	unsigned volatile short *ap = (unsigned volatile short *)addr;
+	unsigned short *bp = (unsigned short *)buf;
+	unsigned short d;
+	while(len--) {
+		d = *ap;
+		*bp++ = (d >> 8) | (d << 8);
+	}
+}
+
+static inline void target_ide_fix_driveid(struct hd_driveid *id)
+{
+	int c;
+	unsigned short *p = (unsigned short *)id;
+	for (c = 0; c < SECTOR_WORDS; c++, p++)
+		*p = (*p >> 8) | (*p << 8);
+}
+
+#endif
diff -Nru linux-2.6.0-test2-h8300/include/asm-h8300/h8max/ne.h linux-2.6.0-test2-h8300-makefix/include/asm-h8300/h8max/ne.h
--- linux-2.6.0-test2-h8300/include/asm-h8300/h8max/ne.h	2003-07-19 21:41:33.000000000 +0900
+++ linux-2.6.0-test2-h8300-makefix/include/asm-h8300/h8max/ne.h	1970-01-01 09:00:00.000000000 +0900
@@ -1,97 +0,0 @@
-/* H8MAX RTL8019AS Config */
-
-#ifndef __H8300_H8MAX_NE__
-#define __H8300_H8MAX_NE__
-
-#define NE2000_ADDR		0x800600
-#define NE2000_IRQ              4
-#define NE2000_IRQ_VECTOR	(12 + NE2000_IRQ)
-#define	NE2000_BYTE		volatile unsigned short
-
-#define IER                     0xfee015
-#define ISR			0xfee016
-#define IRQ_MASK		(1 << NE2000_IRQ)
-/* sorry quick hack */
-#if defined(outb)
-# undef outb
-#endif
-#define outb(d,a)               h8max_outb((d),(a) - NE2000_ADDR)
-#if defined(inb)
-# undef inb
-#endif
-#define inb(a)                  h8max_inb((a) - NE2000_ADDR)
-#if defined(outb_p)
-# undef outb_p
-#endif
-#define outb_p(d,a)             h8max_outb((d),(a) - NE2000_ADDR)
-#if defined(inb_p)
-# undef inb_p
-#endif
-#define inb_p(a)                h8max_inb((a) - NE2000_ADDR)
-#if defined(outsw)
-# undef outsw
-#endif
-#define outsw(a,p,l)            h8max_outsw((a) - NE2000_ADDR,(unsigned short *)p,l)
-#if defined(insw)
-# undef insw
-#endif
-#define insw(a,p,l)             h8max_insw((a) - NE2000_ADDR,(unsigned short *)p,l)
-#if defined(outsb)
-# undef outsb
-#endif
-#define outsb(a,p,l)            h8max_outsb((a) - NE2000_ADDR,(unsigned char *)p,l)
-#if defined(insb)
-# undef insb
-#endif
-#define insb(a,p,l)             h8max_insb((a) - NE2000_ADDR,(unsigned char *)p,l)
-
-#define H8300_INIT_NE()                  \
-do {                                     \
-	wordlength = 2;                  \
-	h8max_outb(0x49, ioaddr + EN0_DCFG); \
-	SA_prom[14] = SA_prom[15] = 0x57;\
-} while(0)
-
-static inline void h8max_outb(unsigned char d,unsigned char a)
-{
-	*(unsigned short *)(NE2000_ADDR + (a << 1)) = d;
-}
-
-static inline unsigned char h8max_inb(unsigned char a)
-{
-	return *(unsigned char *)(NE2000_ADDR + (a << 1) +1);
-}
-
-static inline void h8max_outsw(unsigned char a,unsigned short *p,unsigned long l)
-{
-	unsigned short d;
-	for (; l != 0; --l, p++) {
-		d = (((*p) >> 8) & 0xff) | ((*p) << 8);
-		*(unsigned short *)(NE2000_ADDR + (a << 1)) = d;
-	}
-}
-
-static inline void h8max_insw(unsigned char a,unsigned short *p,unsigned long l)
-{
-	unsigned short d;
-	for (; l != 0; --l, p++) {
-		d = *(unsigned short *)(NE2000_ADDR + (a << 1));
-		*p = (d << 8)|((d >> 8) & 0xff);
-	}
-}
-
-static inline void h8max_outsb(unsigned char a,unsigned char *p,unsigned long l)
-{
-	for (; l != 0; --l, p++) {
-		*(unsigned short *)(NE2000_ADDR + (a << 1)) = *p;
-	}
-}
-
-static inline void h8max_insb(unsigned char a,unsigned char *p,unsigned long l)
-{
-	for (; l != 0; --l, p++) {
-		*p = *((unsigned char *)(NE2000_ADDR + (a << 1))+1);
-	}
-}
-
-#endif
diff -Nru linux-2.6.0-test2-h8300/include/asm-h8300/h8max/timer_rate.h linux-2.6.0-test2-h8300-makefix/include/asm-h8300/h8max/timer_rate.h
--- linux-2.6.0-test2-h8300/include/asm-h8300/h8max/timer_rate.h	2003-07-20 01:19:25.000000000 +0900
+++ linux-2.6.0-test2-h8300-makefix/include/asm-h8300/h8max/timer_rate.h	1970-01-01 09:00:00.000000000 +0900
@@ -1,10 +0,0 @@
-#ifndef __H8300_H8MAX_TIMER_RATE__
-#define __H8300_H8MAX_TIMER_RATE__
-
-#include <linux/config.h>
-
-#define H8300_TIMER_COUNT_DATA CONFIG_CPU_CLOCK*10/8192
-#define H8300_TIMER_FREQ CONFIG_CPU_CLOCK*1000/8192
-
-#endif
-
diff -Nru linux-2.6.0-test2-h8300/include/asm-h8300/ide.h linux-2.6.0-test2-h8300-makefix/include/asm-h8300/ide.h
--- linux-2.6.0-test2-h8300/include/asm-h8300/ide.h	2003-07-14 15:04:49.000000000 +0900
+++ linux-2.6.0-test2-h8300-makefix/include/asm-h8300/ide.h	2003-07-30 17:41:06.000000000 +0900
@@ -70,9 +70,10 @@
  *	Our list of ports/irq's for different boards.
  */
 
-/* Such a description is OK ? */
-#define DEPEND_HEADER(target) <asm/target/ide.h> 
-#include DEPEND_HEADER(TARGET)
+/* machine depend header include */
+#define H8300_IDE_DEFINE
+#include <asm/machine-depend.h>
+#undef  H8300_IDE_DEFINE
 
 /****************************************************************************/
 
diff -Nru linux-2.6.0-test2-h8300/include/asm-h8300/machine-depend.h linux-2.6.0-test2-h8300-makefix/include/asm-h8300/machine-depend.h
--- linux-2.6.0-test2-h8300/include/asm-h8300/machine-depend.h	1970-01-01 09:00:00.000000000 +0900
+++ linux-2.6.0-test2-h8300-makefix/include/asm-h8300/machine-depend.h	2003-07-30 18:42:26.000000000 +0900
@@ -0,0 +1,70 @@
+/* EDOSK2674 board depend header */
+
+/* TIMER rate define */
+#ifdef H8300_TIMER_DEFINE
+#define H8300_TIMER_COUNT_DATA 33000*10/8192
+#define H8300_TIMER_FREQ 33000*1000/8192
+#endif
+
+/* EDOSK-2674R SMSC Network Controler Target Depend impliments */
+#ifdef H8300_SMSC_DEFINE
+
+#define SMSC_BASE 0xf80000
+#define SMSC_IRQ 16
+
+/* sorry quick hack */
+#if defined(outw)
+# undef outw
+#endif
+#define outw(d,a) edosk2674_smsc_outw(d,(volatile unsigned short *)(a))
+#if defined(inw)
+# undef inw
+#endif
+#define inw(a) edosk2674_smsc_inw((volatile unsigned short *)(a))
+#if defined(outsw)
+# undef outsw
+#endif
+#define outsw(a,p,l) edosk2674_smsc_outsw((volatile unsigned short *)(a),p,l)
+#if defined(insw)
+# undef insw
+#endif
+#define insw(a,p,l) edosk2674_smsc_insw((volatile unsigned short *)(a),p,l)
+
+static inline void edosk2674_smsc_outw(
+	unsigned short d,
+	volatile unsigned short *a
+	)
+{
+	*a = (d >> 8) | (d << 8);
+}
+
+static inline unsigned short edosk2674_smsc_inw(
+	volatile unsigned short *a
+	)
+{
+	unsigned short d;
+	d = *a;
+	return (d >> 8) | (d << 8);
+}
+
+static inline void edosk2674_smsc_outsw(
+	volatile unsigned short *a,
+	unsigned short *p,
+	unsigned long l
+	)
+{
+	for (; l != 0; --l, p++)
+		*a = *p;
+}
+
+static inline void edosk2674_smsc_insw(
+	volatile unsigned short *a,
+	unsigned short *p,
+	unsigned long l
+	)
+{
+	for (; l != 0; --l, p++)
+		*p = *a;
+}
+
+#endif
diff -Nru linux-2.6.0-test2-h8300/include/asm-h8300/timex.h linux-2.6.0-test2-h8300-makefix/include/asm-h8300/timex.h
--- linux-2.6.0-test2-h8300/include/asm-h8300/timex.h	2003-07-14 15:04:49.000000000 +0900
+++ linux-2.6.0-test2-h8300-makefix/include/asm-h8300/timex.h	2003-07-30 17:41:06.000000000 +0900
@@ -6,9 +6,9 @@
 #ifndef _ASM_H8300_TIMEX_H
 #define _ASM_H8300_TIMEX_H
 
-/* Such a description is OK ? */
-#define TIMEX_DEPEND_HEADER(target) <asm/target/timer_rate.h> 
-#include TIMEX_DEPEND_HEADER(TARGET)
+#define H8300_TIMER_DEFINE
+#include <asm/machine-depend.h>
+#undef  H8300_TIMER_DEFINE
 
 #define CLOCK_TICK_RATE H8300_TIMER_FREQ
 #define CLOCK_TICK_FACTOR	20	/* Factor of both 1000000 and CLOCK_TICK_RATE */

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-07-30 12:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-28 14:18 [PATCH] linux-2.6.0-test2 h8300 archtecure support update (1/6) Yoshinori Sato
2003-07-29 19:20 ` Sam Ravnborg
2003-07-30 12:20   ` Yoshinori Sato

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).