Skip to contentSkip to conversation

h8300 update

GIT PULL Yoshinori Sato 1 participant 1 message Jan 11, 2010

lore
Share & tools
lore
#0 lore raw

- add ioread/write macros
- add missing header include
- add __clear_user
- move die definition

---
 arch/h8300/Makefile                         |    2 --
 arch/h8300/include/asm/io.h                 |    7 +++++++
 arch/h8300/include/asm/pgtable.h            |    2 ++
 arch/h8300/include/asm/system.h             |    2 --
 arch/h8300/include/asm/uaccess.h            |    3 ++-
 arch/h8300/kernel/time.c                    |    1 +
 arch/h8300/mm/fault.c                       |    2 ++
 arch/h8300/platform/h8300h/generic/Makefile |    2 +-
 8 files changed, 15 insertions(+), 6 deletions(-)
arch/h8300/Makefile +0 -2
index a556447..7486ea9 100644
@@ -41,8 +41,6 @@ LDFLAGS += $(ldflags-y)
 CROSS_COMPILE = h8300-elf-
 LIBGCC := $(shell $(CROSS-COMPILE)$(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
 
-head-y := arch/$(ARCH)/platform/$(PLATFORM)/$(BOARD)/crt0_$(MODEL).o
-
 core-y	+= arch/$(ARCH)/kernel/ \
 	   arch/$(ARCH)/mm/
 ifdef PLATFORM
arch/h8300/include/asm/io.h +7 -0
index 33e842f..a16f15e 100644
@@ -233,6 +233,13 @@ static inline void io_insl_noswap(unsigned int addr, void *buf, int len)
 #define insw(a,b,l) io_insw(a,b,l)
 #define insl(a,b,l) io_insl(a,b,l)
 
+#define ioread8(a)		__raw_readb(a)
+#define ioread16(a)		__raw_readw(a)
+#define ioread32(a)		__raw_readl(a)
+
+#define iowrite8(v,a)		__raw_writeb((v),(a))
+#define iowrite16(v,a)		__raw_writew((v),(a))
+#define iowrite32(v,a)		__raw_writel((v),(a))
 #define IO_SPACE_LIMIT 0xffffff
 
 
arch/h8300/include/asm/pgtable.h +2 -0
index a09230a..0755116 100644
@@ -70,4 +70,6 @@ extern int is_in_rom(unsigned long);
 #define	VMALLOC_END	0xffffffff
 
 #define arch_enter_lazy_cpu_mode()    do {} while (0)
+
+#include <asm-generic/pgtable.h>
 #endif /* _H8300_PGTABLE_H */
arch/h8300/include/asm/system.h +0 -2
index d98d976..4b8e475 100644
@@ -155,6 +155,4 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz
 
 #define arch_align_stack(x) (x)
 
-void die(char *str, struct pt_regs *fp, unsigned long err);
-
 #endif /* _H8300_SYSTEM_H */
arch/h8300/include/asm/uaccess.h +2 -1
index 356068c..352c193 100644
@@ -153,10 +153,11 @@ static inline long strnlen_user(const char *src, long n)
  */
 
 static inline unsigned long
-clear_user(void *to, unsigned long n)
+__clear_user(void *to, unsigned long n)
 {
 	memset(to, 0, n);
 	return 0;
 }
+#define clear_user(to, size) __clear_user(to, size)
 
 #endif /* _H8300_UACCESS_H */
arch/h8300/kernel/time.c +1 -0
index 7f2d6cf..259afa5 100644
@@ -28,6 +28,7 @@
 
 #include <asm/io.h>
 #include <asm/timer.h>
+#include <asm/irq_regs.h>
 
 #define	TICK_SIZE (tick_nsec / 1000)
 
arch/h8300/mm/fault.c +2 -0
index 1d092ab..47f2ced 100644
@@ -20,6 +20,8 @@
 #include <asm/system.h>
 #include <asm/pgtable.h>
 
+void die(char *str, struct pt_regs *fp, unsigned long err);
+
 /*
  * This routine handles page faults.  It determines the problem, and
  * then passes it off to one of the appropriate routines.
arch/h8300/platform/h8300h/generic/Makefile +1 -1
index 2b12a17..aaed304 100644
@@ -2,4 +2,4 @@
 # Makefile for the linux kernel.
 #
 
-extra-y :=  crt0_$(MODEL).o
+obj-y :=  crt0_$(MODEL).o
Signature · 1 line
1.6.5.3