Skip to contentSkip to conversation

add support for PC-9800 architecture (kernel)

PATCH In review Osamu Tomita 1 participant 1 message Oct 18, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 12/25 add support for PC-9800 architecture (kernel)

This is part 12/26 of patchset for add support NEC PC-9800 architecture, against 2.5.43.

Summary:
- add PC-9800 special features.
- CLOCK_TICK is not constant.
- odd/even only IO region mapping.

diffstat:

 include/linux/ioport.h |   14 ++++++
 kernel/dma.c           |    3 +
 kernel/resource.c      |  100 ++++++++++++++++++++++++++++++++++++++++++++++++-
 kernel/timer.c         |    5 ++
 4 files changed, 119 insertions(+), 3 deletions(-)

patch:

kernel/dma.c +3 -0
diff -urN linux/kernel/dma.c linux98/kernel/dma.c
@@ -9,6 +9,7 @@
  *   [It also happened to remove the sizeof(char *) == sizeof(int)
  *   assumption introduced because of those /proc/dma patches. -- Hennus]
  */
+#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
@@ -62,10 +63,12 @@
 	{ 0, 0 },
 	{ 0, 0 },
 	{ 0, 0 },
+#ifndef CONFIG_PC9800
 	{ 1, "cascade" },
 	{ 0, 0 },
 	{ 0, 0 },
 	{ 0, 0 }
+#endif
 };
 
 
kernel/resource.c +98 -2

196 lines not on this page · raw message

kernel/timer.c +5 -0
diff -urN linux/kernel/timer.c linux98/kernel/timer.c
@@ -376,8 +376,13 @@
 /*
  * Timekeeping variables
  */
+#ifndef CONFIG_PC9800
 unsigned long tick_usec = TICK_USEC; 		/* ACTHZ   period (usec) */
 unsigned long tick_nsec = TICK_NSEC(TICK_USEC);	/* USER_HZ period (nsec) */
+#else
+extern unsigned long tick_usec; 		/* ACTHZ   period (usec) */
+extern unsigned long tick_nsec;			/* USER_HZ period (nsec) */
+#endif
 
 /* The current time */
 struct timespec xtime __attribute__ ((aligned (16)));
include/linux/ioport.h +13 -1
diff -urN linux/include/linux/ioport.h linux98/include/linux/ioport.h
@@ -79,6 +79,10 @@
 #define IORESOURCE_MEM_SHADOWABLE	(1<<5)	/* dup: IORESOURCE_SHADOWABLE */
 #define IORESOURCE_MEM_EXPANSIONROM	(1<<6)
 
+#ifdef CONFIG_PC9800
+#define IORESOURCE98_SPARSE 0x100000 /* sparse region */
+#endif
+
 /* PC/ISA/whatever - the normal PC address spaces: IO and memory */
 extern struct resource ioport_resource;
 extern struct resource iomem_resource;
@@ -99,8 +103,11 @@
 /* Convenience shorthand with allocation */
 #define request_region(start,n,name)	__request_region(&ioport_resource, (start), (n), (name))
 #define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name))
-
+#ifndef CONFIG_PC9800
 extern struct resource * __request_region(struct resource *, unsigned long start, unsigned long n, const char *name);
+#else
+extern struct resource * __request_region(struct resource *, unsigned long start, long n, const char *name);
+#endif
 
 /* Compatibility cruft */
 #define check_region(start,n)	__check_region(&ioport_resource, (start), (n))
@@ -108,8 +115,13 @@
 #define check_mem_region(start,n)	__check_region(&iomem_resource, (start), (n))
 #define release_mem_region(start,n)	__release_region(&iomem_resource, (start), (n))
 
+#ifndef CONFIG_PC9800
 extern int __check_region(struct resource *, unsigned long, unsigned long);
 extern void __release_region(struct resource *, unsigned long, unsigned long);
+#else
+extern int __check_region(struct resource *, unsigned long, long);
+extern void __release_region(struct resource *, unsigned long, long);
+#endif
 
 #define get_ioport_list(buf)	get_resource_list(&ioport_resource, buf, PAGE_SIZE)
 #define get_mem_list(buf)	get_resource_list(&iomem_resource, buf, PAGE_SIZE)