summaryrefslogtreecommitdiffstats
path: root/include/asm-ppc
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2001-04-05 04:55:58 +0000
committerRalf Baechle <ralf@linux-mips.org>2001-04-05 04:55:58 +0000
commit74a9f2e1b4d3ab45a9f72cb5b556c9f521524ab3 (patch)
tree7c4cdb103ab1b388c9852a88bd6fb1e73eba0b5c /include/asm-ppc
parentee6374c8b0d333c08061c6a97bc77090d7461225 (diff)
Merge with Linux 2.4.3.
Note that mingetty does no longer work with serial console, you have to switch to another getty like getty_ps. This commit also includes a fix for a setitimer bug which did prevent getty_ps from working on older kernels.
Diffstat (limited to 'include/asm-ppc')
-rw-r--r--include/asm-ppc/cpm_8260.h2
-rw-r--r--include/asm-ppc/highmem.h2
-rw-r--r--include/asm-ppc/irq.h16
-rw-r--r--include/asm-ppc/ivms8.h92
-rw-r--r--include/asm-ppc/mpc8xx.h12
-rw-r--r--include/asm-ppc/pci.h1
-rw-r--r--include/asm-ppc/pgalloc.h100
-rw-r--r--include/asm-ppc/processor.h2
-rw-r--r--include/asm-ppc/semaphore.h15
-rw-r--r--include/asm-ppc/spd8xx.h105
-rw-r--r--include/asm-ppc/system.h9
-rw-r--r--include/asm-ppc/time.h3
-rw-r--r--include/asm-ppc/tlb.h1
-rw-r--r--include/asm-ppc/tqm860.h67
-rw-r--r--include/asm-ppc/tqm8xx.h76
-rw-r--r--include/asm-ppc/tqm8xxL.h68
16 files changed, 344 insertions, 227 deletions
diff --git a/include/asm-ppc/cpm_8260.h b/include/asm-ppc/cpm_8260.h
index b612cf02f..3265bc08d 100644
--- a/include/asm-ppc/cpm_8260.h
+++ b/include/asm-ppc/cpm_8260.h
@@ -112,7 +112,7 @@ typedef struct cpm_buf_desc {
uint cbd_bufaddr; /* Buffer address in host memory */
} cbd_t;
-#define BD_SC_EMPTY ((ushort)0x8000) /* Recieve is empty */
+#define BD_SC_EMPTY ((ushort)0x8000) /* Receive is empty */
#define BD_SC_READY ((ushort)0x8000) /* Transmit is ready */
#define BD_SC_WRAP ((ushort)0x2000) /* Last buffer descriptor */
#define BD_SC_INTRPT ((ushort)0x1000) /* Interrupt on change */
diff --git a/include/asm-ppc/highmem.h b/include/asm-ppc/highmem.h
index 38114e564..0ee36b531 100644
--- a/include/asm-ppc/highmem.h
+++ b/include/asm-ppc/highmem.h
@@ -4,7 +4,7 @@
* PowerPC version, stolen from the i386 version.
*
* Used in CONFIG_HIGHMEM systems for memory pages which
- * are not addressable by direct kernel virtual adresses.
+ * are not addressable by direct kernel virtual addresses.
*
* Copyright (C) 1999 Gerhard Wichert, Siemens AG
* Gerhard.Wichert@pdb.siemens.de
diff --git a/include/asm-ppc/irq.h b/include/asm-ppc/irq.h
index 139dfea0c..d3056553e 100644
--- a/include/asm-ppc/irq.h
+++ b/include/asm-ppc/irq.h
@@ -88,24 +88,32 @@ irq_cannonicalize(int irq)
#define SIU_IRQ7 (14)
#define SIU_LEVEL7 (15)
+/* Now include the board configuration specific associations.
+*/
+#include <asm/mpc8xx.h>
+
/* The internal interrupts we can configure as we see fit.
* My personal preference is CPM at level 2, which puts it above the
* MBX PCI/ISA/IDE interrupts.
*/
+#ifndef PIT_INTERRUPT
#define PIT_INTERRUPT SIU_LEVEL0
+#endif
+#ifndef CPM_INTERRUPT
#define CPM_INTERRUPT SIU_LEVEL2
+#endif
+#ifndef PCMCIA_INTERRUPT
#define PCMCIA_INTERRUPT SIU_LEVEL6
+#endif
+#ifndef DEC_INTERRUPT
#define DEC_INTERRUPT SIU_LEVEL7
+#endif
/* Some internal interrupt registers use an 8-bit mask for the interrupt
* level instead of a number.
*/
#define mk_int_int_mask(IL) (1 << (7 - (IL/2)))
-/* Now include the board configuration specific associations.
-*/
-#include <asm/mpc8xx.h>
-
/* always the same on 8xx -- Cort */
static __inline__ int irq_cannonicalize(int irq)
{
diff --git a/include/asm-ppc/ivms8.h b/include/asm-ppc/ivms8.h
new file mode 100644
index 000000000..3976b3f29
--- /dev/null
+++ b/include/asm-ppc/ivms8.h
@@ -0,0 +1,92 @@
+/*
+ * A collection of structures, addresses, and values associated with
+ * Speech Design Integrated Voicemail Systems (IVMS8) boards.
+ *
+ * Copyright (c) 2000 Wolfgang Denk (wd@denx.de)
+ */
+#ifndef __MACH_IVMS8_DEFS
+#define __MACH_IVMS8_DEFS
+
+#ifndef __ASSEMBLY__
+
+typedef void (interrupt_handler_t)(void *);
+
+typedef struct serial_io {
+ int (*getc)(void);
+ int (*tstc)(void);
+ void (*putc)(const char c);
+ void (*printf)(const char *fmt, ...);
+} serial_io_t;
+
+typedef struct intr_util {
+ void (*install_hdlr)(int, interrupt_handler_t *, void *);
+ void (*free_hdlr)(int);
+} intr_util_t;
+
+
+/* A Board Information structure that is given to a program when
+ * ppcboot starts it up.
+ */
+typedef struct bd_info {
+ unsigned long bi_memstart; /* start of DRAM memory */
+ unsigned long bi_memsize; /* size of DRAM memory in bytes */
+ unsigned long bi_flashstart; /* start of FLASH memory */
+ unsigned long bi_flashsize; /* size of FLASH memory */
+ unsigned long bi_flashoffset; /* reserved area for startup monitor */
+ unsigned long bi_sramstart; /* start of SRAM memory */
+ unsigned long bi_sramsize; /* size of SRAM memory */
+ unsigned long bi_immr_base; /* base of IMMR register */
+ unsigned long bi_bootflags; /* boot / reboot flag (for LynxOS) */
+ unsigned long bi_ip_addr; /* IP Address */
+ unsigned char bi_enetaddr[6]; /* Ethernet adress */
+ unsigned char bi_reserved[2]; /* -- just for alignment -- */
+ unsigned long bi_intfreq; /* Internal Freq, in MHz */
+ unsigned long bi_busfreq; /* Bus Freq, in MHz */
+ unsigned long bi_baudrate; /* Console Baudrate */
+ serial_io_t bi_serial_io; /* Addr of monitor fnc for Console I/O */
+ intr_util_t bi_interrupt; /* Addr of monitor fnc for Interrupts */
+} bd_t;
+
+#endif /* __ASSEMBLY__ */
+
+#define IVMS_IMMR_BASE 0xFFF00000 /* phys. addr of IMMR */
+#define IVMS_IMAP_SIZE (64 * 1024) /* size of mapped area */
+
+#define IMAP_ADDR IVMS_IMMR_BASE /* physical base address of IMMR area */
+#define IMAP_SIZE IVMS_IMAP_SIZE /* mapped size of IMMR area */
+
+#define PCMCIA_MEM_ADDR ((uint)0xFE100000)
+#define PCMCIA_MEM_SIZE ((uint)(64 * 1024))
+
+#define FEC_INTERRUPT 9 /* = SIU_LEVEL4 */
+#define IDE0_INTERRUPT 10 /* = IRQ5 */
+#define CPM_INTERRUPT 11 /* = SIU_LEVEL5 (was: SIU_LEVEL2) */
+#define PHY_INTERRUPT 12 /* = IRQ6 */
+
+#define MAX_HWIFS 1 /* overwrite default in include/asm-ppc/ide.h */
+
+/*
+ * Definitions for IDE0 Interface
+ */
+#define IDE0_BASE_OFFSET 0x0000 /* Offset in PCMCIA memory */
+#define IDE0_DATA_REG_OFFSET 0x0000
+#define IDE0_ERROR_REG_OFFSET 0x0081
+#define IDE0_NSECTOR_REG_OFFSET 0x0082
+#define IDE0_SECTOR_REG_OFFSET 0x0083
+#define IDE0_LCYL_REG_OFFSET 0x0084
+#define IDE0_HCYL_REG_OFFSET 0x0085
+#define IDE0_SELECT_REG_OFFSET 0x0086
+#define IDE0_STATUS_REG_OFFSET 0x0087
+#define IDE0_CONTROL_REG_OFFSET 0x0106
+#define IDE0_IRQ_REG_OFFSET 0x000A /* not used */
+
+/* We don't use the 8259.
+*/
+#define NR_8259_INTS 0
+
+/* Generic 8xx type
+*/
+#define _MACH_8xx (_MACH_ivms8)
+
+#endif /* __MACH_IVMS8_DEFS */
+
diff --git a/include/asm-ppc/mpc8xx.h b/include/asm-ppc/mpc8xx.h
index 2476f7540..499114d00 100644
--- a/include/asm-ppc/mpc8xx.h
+++ b/include/asm-ppc/mpc8xx.h
@@ -33,12 +33,16 @@
#include <asm/rpxclassic.h>
#endif
-#if (defined(CONFIG_TQM860) || defined(CONFIG_TQM860L))
-#include <asm/tqm860.h>
+#if (defined(CONFIG_TQM860) || defined(CONFIG_TQM8xxL))
+#include <asm/tqm8xx.h>
#endif
-#ifdef CONFIG_TQM8xxL
-#include <asm/tqm8xxL.h>
+#if defined(CONFIG_SPD823TS)
+#include <asm/spd8xx.h>
+#endif
+
+#if defined(CONFIG_IVMS8)
+#include <asm/ivms8.h>
#endif
/* I need this to get pt_regs.......
diff --git a/include/asm-ppc/pci.h b/include/asm-ppc/pci.h
index a1cfa7d31..4a46b9601 100644
--- a/include/asm-ppc/pci.h
+++ b/include/asm-ppc/pci.h
@@ -34,6 +34,7 @@ extern unsigned long pci_resource_to_bus(struct pci_dev *pdev, struct resource *
*
* Obsolete ! Drivers should now use pci_resource_to_bus
*/
+extern unsigned long phys_to_bus(unsigned long pa);
extern unsigned long pci_phys_to_bus(unsigned long pa, int busnr);
extern unsigned long pci_bus_to_phys(unsigned int ba, int busnr);
diff --git a/include/asm-ppc/pgalloc.h b/include/asm-ppc/pgalloc.h
index 7da57a6f2..0154dc881 100644
--- a/include/asm-ppc/pgalloc.h
+++ b/include/asm-ppc/pgalloc.h
@@ -52,48 +52,12 @@ extern unsigned long get_zero_page_fast(void);
extern void __bad_pte(pmd_t *pmd);
-/* We don't use pmd cache, so this is a dummy routine */
-extern __inline__ pmd_t *get_pmd_fast(void)
-{
- return (pmd_t *)0;
-}
-
-extern __inline__ void free_pmd_fast(pmd_t *pmd)
-{
-}
-
-extern __inline__ void free_pmd_slow(pmd_t *pmd)
-{
-}
-
-/*
- * allocating and freeing a pmd is trivial: the 1-entry pmd is
- * inside the pgd, so has no extra memory associated with it.
- */
-extern inline void pmd_free(pmd_t * pmd)
-{
-}
-
-extern inline pmd_t * pmd_alloc(pgd_t * pgd, unsigned long address)
-{
- return (pmd_t *) pgd;
-}
-
-#define pmd_free_kernel pmd_free
-#define pmd_alloc_kernel pmd_alloc
-#define pte_alloc_kernel pte_alloc
-
extern __inline__ pgd_t *get_pgd_slow(void)
{
- pgd_t *ret, *init;
- /*if ( (ret = (pgd_t *)get_zero_page_fast()) == NULL )*/
- if ( (ret = (pgd_t *)__get_free_page(GFP_KERNEL)) != NULL )
- memset (ret, 0, USER_PTRS_PER_PGD * sizeof(pgd_t));
- if (ret) {
- init = pgd_offset(&init_mm, 0);
- memcpy (ret + USER_PTRS_PER_PGD, init + USER_PTRS_PER_PGD,
- (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t));
- }
+ pgd_t *ret;
+
+ if ((ret = (pgd_t *)__get_free_page(GFP_KERNEL)) != NULL)
+ clear_page(ret);
return ret;
}
@@ -122,9 +86,34 @@ extern __inline__ void free_pgd_slow(pgd_t *pgd)
free_page((unsigned long)pgd);
}
-extern pte_t *get_pte_slow(pmd_t *pmd, unsigned long address_preadjusted);
+#define pgd_free(pgd) free_pgd_fast(pgd)
+#define pgd_alloc() get_pgd_fast()
+
+/*
+ * We don't have any real pmd's, and this code never triggers because
+ * the pgd will always be present..
+ */
+#define pmd_alloc_one_fast(mm, address) ({ BUG(); ((pmd_t *)1); })
+#define pmd_alloc_one(mm,address) ({ BUG(); ((pmd_t *)2); })
+#define pmd_free(x) do { } while (0)
+#define pgd_populate(mm, pmd, pte) BUG()
-extern __inline__ pte_t *get_pte_fast(void)
+static inline pte_t *pte_alloc_one(struct mm_struct *mm, unsigned long address)
+{
+ pte_t *pte;
+ extern int mem_init_done;
+ extern void *early_get_page(void);
+
+ if (mem_init_done)
+ pte = (pte_t *) __get_free_page(GFP_KERNEL);
+ else
+ pte = (pte_t *) early_get_page();
+ if (pte != NULL)
+ clear_page(pte);
+ return pte;
+}
+
+static inline pte_t *pte_alloc_one_fast(struct mm_struct *mm, unsigned long address)
{
unsigned long *ret;
@@ -136,40 +125,21 @@ extern __inline__ pte_t *get_pte_fast(void)
return (pte_t *)ret;
}
-extern __inline__ void free_pte_fast(pte_t *pte)
+extern __inline__ void pte_free_fast(pte_t *pte)
{
*(unsigned long **)pte = pte_quicklist;
pte_quicklist = (unsigned long *) pte;
pgtable_cache_size++;
}
-extern __inline__ void free_pte_slow(pte_t *pte)
+extern __inline__ void pte_free_slow(pte_t *pte)
{
free_page((unsigned long)pte);
}
-#define pte_free_kernel(pte) free_pte_fast(pte)
-#define pte_free(pte) free_pte_fast(pte)
-#define pgd_free(pgd) free_pgd_fast(pgd)
-#define pgd_alloc() get_pgd_fast()
+#define pte_free(pte) pte_free_slow(pte)
-extern inline pte_t * pte_alloc(pmd_t * pmd, unsigned long address)
-{
- address = (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1);
- if (pmd_none(*pmd)) {
- pte_t * page = (pte_t *) get_pte_fast();
-
- if (!page)
- return get_pte_slow(pmd, address);
- pmd_val(*pmd) = (unsigned long) page;
- return page + address;
- }
- if (pmd_bad(*pmd)) {
- __bad_pte(pmd);
- return NULL;
- }
- return (pte_t *) pmd_page(*pmd) + address;
-}
+#define pmd_populate(mm, pmd, pte) (pmd_val(*(pmd)) = (unsigned long) (pte))
extern int do_check_pgt_cache(int, int);
diff --git a/include/asm-ppc/processor.h b/include/asm-ppc/processor.h
index cd87f248e..dc96fdcaf 100644
--- a/include/asm-ppc/processor.h
+++ b/include/asm-ppc/processor.h
@@ -516,6 +516,8 @@
#define _MACH_8260 0x00002000 /* Generic 8260 */
#define _MACH_tqm860 0x00004000 /* TQM860/L */
#define _MACH_tqm8xxL 0x00008000 /* TQM8xxL */
+#define _MACH_spd8xxL 0x00010000 /* SPD8xx */
+#define _MACH_ibms8 0x00020000 /* IVMS8 */
/* see residual.h for these */
#define _PREP_Motorola 0x01 /* motorola prep */
diff --git a/include/asm-ppc/semaphore.h b/include/asm-ppc/semaphore.h
index 92063a868..da81ad23e 100644
--- a/include/asm-ppc/semaphore.h
+++ b/include/asm-ppc/semaphore.h
@@ -119,20 +119,21 @@ struct rw_semaphore
#endif
};
-#define __RWSEM_INITIALIZER(name, rd, wr) \
+#define RW_LOCK_BIAS 2 /* XXX bogus */
+#define __RWSEM_INITIALIZER(name, count) \
{ \
SPIN_LOCK_UNLOCKED, \
- (rd), (wr), \
+ (count) == 1, (count) == 0, \
__WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
__SEM_DEBUG_INIT(name) \
}
-#define __DECLARE_RWSEM_GENERIC(name, rd, wr) \
- struct rw_semaphore name = __RWSEM_INITIALIZER(name, rd, wr)
+#define __DECLARE_RWSEM_GENERIC(name, count) \
+ struct rw_semaphore name = __RWSEM_INITIALIZER(name, count)
-#define DECLARE_RWSEM(name) __DECLARE_RWSEM_GENERIC(name, 0, 0)
-#define DECLARE_RWSEM_READ_LOCKED(name) __DECLARE_RWSEM_GENERIC(name, 1, 0)
-#define DECLAER_RWSEM_WRITE_LOCKED(name) __DECLARE_RWSEM_GENERIC(name, 0, 1)
+#define DECLARE_RWSEM(name) __DECLARE_RWSEM_GENERIC(name, RW_LOCK_BIAS)
+#define DECLARE_RWSEM_READ_LOCKED(name) __DECLARE_RWSEM_GENERIC(name, RW_LOCK_BIAS-1)
+#define DECLARE_RWSEM_WRITE_LOCKED(name) __DECLARE_RWSEM_GENERIC(name, 0)
extern inline void init_rwsem(struct rw_semaphore *sem)
{
diff --git a/include/asm-ppc/spd8xx.h b/include/asm-ppc/spd8xx.h
new file mode 100644
index 000000000..543246636
--- /dev/null
+++ b/include/asm-ppc/spd8xx.h
@@ -0,0 +1,105 @@
+/*
+ * A collection of structures, addresses, and values associated with
+ * Speech Design SPD8xxTS boards.
+ *
+ * Copyright (c) 2000 Wolfgang Denk (wd@denx.de)
+ */
+#ifndef __MACH_SPD8xx_DEFS
+#define __MACH_SPD8xx_DEFS
+
+#ifndef __ASSEMBLY__
+
+typedef void (interrupt_handler_t)(void *);
+
+typedef struct serial_io {
+ int (*getc)(void);
+ int (*tstc)(void);
+ void (*putc)(const char c);
+ void (*printf)(const char *fmt, ...);
+} serial_io_t;
+
+typedef struct intr_util {
+ void (*install_hdlr)(int, interrupt_handler_t *, void *);
+ void (*free_hdlr)(int);
+} intr_util_t;
+
+
+/* A Board Information structure that is given to a program when
+ * ppcboot starts it up.
+ */
+typedef struct bd_info {
+ unsigned long bi_memstart; /* start of DRAM memory */
+ unsigned long bi_memsize; /* size of DRAM memory in bytes */
+ unsigned long bi_flashstart; /* start of FLASH memory */
+ unsigned long bi_flashsize; /* size of FLASH memory */
+ unsigned long bi_flashoffset; /* reserved area for startup monitor */
+ unsigned long bi_sramstart; /* start of SRAM memory */
+ unsigned long bi_sramsize; /* size of SRAM memory */
+ unsigned long bi_immr_base; /* base of IMMR register */
+ unsigned long bi_bootflags; /* boot / reboot flag (for LynxOS) */
+ unsigned long bi_ip_addr; /* IP Address */
+ unsigned char bi_enetaddr[6]; /* Ethernet adress */
+ unsigned char bi_reserved[2]; /* -- just for alignment -- */
+ unsigned long bi_intfreq; /* Internal Freq, in MHz */
+ unsigned long bi_busfreq; /* Bus Freq, in MHz */
+ unsigned long bi_baudrate; /* Console Baudrate */
+ serial_io_t bi_serial_io; /* Addr of monitor fnc for Console I/O */
+ intr_util_t bi_interrupt; /* Addr of monitor fnc for Interrupts */
+} bd_t;
+
+#endif /* __ASSEMBLY__ */
+
+#define SPD_IMMR_BASE 0xFFF00000 /* phys. addr of IMMR */
+#define SPD_IMAP_SIZE (64 * 1024) /* size of mapped area */
+
+#define IMAP_ADDR SPD_IMMR_BASE /* physical base address of IMMR area */
+#define IMAP_SIZE SPD_IMAP_SIZE /* mapped size of IMMR area */
+
+#define PCMCIA_MEM_ADDR ((uint)0xFE100000)
+#define PCMCIA_MEM_SIZE ((uint)(64 * 1024))
+
+#define IDE0_INTERRUPT 10 /* = IRQ5 */
+#define IDE1_INTERRUPT 12 /* = IRQ6 */
+#define CPM_INTERRUPT 13 /* = SIU_LEVEL6 (was: SIU_LEVEL2) */
+
+#define MAX_HWIFS 2 /* overwrite default in include/asm-ppc/ide.h */
+
+/*
+ * Definitions for IDE0 Interface
+ */
+#define IDE0_BASE_OFFSET 0x0000 /* Offset in PCMCIA memory */
+#define IDE0_DATA_REG_OFFSET 0x0000
+#define IDE0_ERROR_REG_OFFSET 0x0081
+#define IDE0_NSECTOR_REG_OFFSET 0x0082
+#define IDE0_SECTOR_REG_OFFSET 0x0083
+#define IDE0_LCYL_REG_OFFSET 0x0084
+#define IDE0_HCYL_REG_OFFSET 0x0085
+#define IDE0_SELECT_REG_OFFSET 0x0086
+#define IDE0_STATUS_REG_OFFSET 0x0087
+#define IDE0_CONTROL_REG_OFFSET 0x0106
+#define IDE0_IRQ_REG_OFFSET 0x000A /* not used */
+
+/*
+ * Definitions for IDE1 Interface
+ */
+#define IDE1_BASE_OFFSET 0x0C00 /* Offset in PCMCIA memory */
+#define IDE1_DATA_REG_OFFSET 0x0000
+#define IDE1_ERROR_REG_OFFSET 0x0081
+#define IDE1_NSECTOR_REG_OFFSET 0x0082
+#define IDE1_SECTOR_REG_OFFSET 0x0083
+#define IDE1_LCYL_REG_OFFSET 0x0084
+#define IDE1_HCYL_REG_OFFSET 0x0085
+#define IDE1_SELECT_REG_OFFSET 0x0086
+#define IDE1_STATUS_REG_OFFSET 0x0087
+#define IDE1_CONTROL_REG_OFFSET 0x0106
+#define IDE1_IRQ_REG_OFFSET 0x000A /* not used */
+
+/* We don't use the 8259.
+*/
+#define NR_8259_INTS 0
+
+/* Generic 8xx type
+*/
+#define _MACH_8xx (_MACH_spd8xx)
+
+#endif /* __MACH_SPD8xx_DEFS */
diff --git a/include/asm-ppc/system.h b/include/asm-ppc/system.h
index 571d2c81f..31354be29 100644
--- a/include/asm-ppc/system.h
+++ b/include/asm-ppc/system.h
@@ -49,15 +49,6 @@
extern void xmon_irq(int, void *, struct pt_regs *);
extern void xmon(struct pt_regs *excp);
-
-
-/* Data cache block flush - write out the cache line containing the
- specified address and then invalidate it in the cache. */
-extern __inline__ void dcbf(void *line)
-{
- asm("dcbf %0,%1; sync" : : "r" (line), "r" (0));
-}
-
extern void print_backtrace(unsigned long *);
extern void show_regs(struct pt_regs * regs);
extern void flush_instruction_cache(void);
diff --git a/include/asm-ppc/time.h b/include/asm-ppc/time.h
index 8f43219a8..114b97305 100644
--- a/include/asm-ppc/time.h
+++ b/include/asm-ppc/time.h
@@ -2,7 +2,7 @@
* $Id: time.h,v 1.12 1999/08/27 04:21:23 cort Exp $
* Common time prototypes and such for all ppc machines.
*
- * Written by Cort Dougan (cort@cs.nmt.edu) to merge
+ * Written by Cort Dougan (cort@fsmlabs.com) to merge
* Paul Mackerras' version and mine for PReP and Pmac.
*/
@@ -16,6 +16,7 @@
extern unsigned tb_ticks_per_jiffy;
extern unsigned tb_to_us;
extern unsigned tb_last_stamp;
+extern unsigned long disarm_decr[NR_CPUS];
extern void to_tm(int tim, struct rtc_time * tm);
extern time_t last_rtc_update;
diff --git a/include/asm-ppc/tlb.h b/include/asm-ppc/tlb.h
new file mode 100644
index 000000000..69c0faa93
--- /dev/null
+++ b/include/asm-ppc/tlb.h
@@ -0,0 +1 @@
+#include <asm-generic/tlb.h>
diff --git a/include/asm-ppc/tqm860.h b/include/asm-ppc/tqm860.h
deleted file mode 100644
index 733dcccdb..000000000
--- a/include/asm-ppc/tqm860.h
+++ /dev/null
@@ -1,67 +0,0 @@
-
-/*
- * A collection of structures, addresses, and values associated with
- * the TQ Systems TQM860 modules. This was originally created for the
- * MBX860, and probably needs revisions for other boards (like the 821).
- * When this file gets out of control, we can split it up into more
- * meaningful pieces.
- *
- * Based on mbx.h, Copyright (c) 1997 Dan Malek (dmalek@jlc.net)
- *
- * Copyright (c) 1999 Wolfgang Denk (wd@denx.de)
- */
-#ifdef __KERNEL__
-#ifndef __MACH_TQM860_DEFS
-#define __MACH_TQM860_DEFS
-
-/* A Board Information structure that is given to a program when
- * EPPC-Bug starts it up.
- */
-typedef struct bd_info {
- unsigned long bi_memstart; /* start of DRAM memory */
- unsigned long bi_memsize; /* size of DRAM memory in bytes */
- unsigned long bi_flashstart; /* start of FLASH memory */
- unsigned long bi_flashsize; /* size of FLASH memory */
- unsigned long bi_flashoffset; /* reserved area for startup monitor */
- unsigned long bi_sramstart; /* start of SRAM memory */
- unsigned long bi_sramsize; /* size of SRAM memory */
- unsigned long bi_immr_base; /* base of IMMR register */
- unsigned long bi_bootflags; /* boot / reboot flag (for LynxOS) */
- unsigned long bi_ip_addr; /* IP Address */
- unsigned char bi_enetaddr[6]; /* Ethernet adress */
- unsigned char bi_reserved[2]; /* -- just for alignment -- */
- unsigned long bi_putchar; /* Addr of monitor putchar() to Console */
- unsigned long bi_intfreq; /* Internal Freq, in MHz */
- unsigned long bi_busfreq; /* Bus Freq, in MHz */
- unsigned long bi_baudrate; /* Console Baudrate */
-} bd_t;
-
-/* Configuration options for TQ Systems TQM860 mini module
- */
-
-#define TQM_RESET_ADDR 0x40000100 /* Monitor Reset Entry */
-
-#define TQM_IMMR_BASE 0xFFF00000 /* phys. addr of IMMR */
-#define TQM_IMAP_SIZE (64 * 1024) /* size of mapped area */
-
-#define TQM_CLOCKRATE 50 /* 50 MHz Clock */
-#define TQM_BAUDRATE 115200 /* Console baud rate */
-#define TQM_IP_ADDR 0x0A000063 /* IP addr: 10.0.0.99 */
-
-#define TQM_SERVER_IP "10.0.0.3" /* NFS server IP addr */
-#define TQM_SERVER_DIR "/LinuxPPC" /* NFS exported root */
-
-#define IMAP_ADDR TQM_IMMR_BASE /* physical base address of IMMR area */
-#define IMAP_SIZE TQM_IMAP_SIZE /* mapped size of IMMR area */
-
-/* We don't use the 8259.
-*/
-#define NR_8259_INTS 0
-
-/* Generic 8xx type
-*/
-#define _MACH_8xx (_MACH_tqm860)
-
-#endif /* __MACH_TQM860_DEFS */
-
-#endif /* __KERNEL__ */
diff --git a/include/asm-ppc/tqm8xx.h b/include/asm-ppc/tqm8xx.h
new file mode 100644
index 000000000..2eff8d969
--- /dev/null
+++ b/include/asm-ppc/tqm8xx.h
@@ -0,0 +1,76 @@
+/*
+ * A collection of structures, addresses, and values associated with
+ * the TQ Systems TQM8xx(L) modules. This was originally created for the
+ * MBX860, and probably needs revisions for other boards (like the 821).
+ * When this file gets out of control, we can split it up into more
+ * meaningful pieces.
+ *
+ * Based on mbx.h, Copyright (c) 1997 Dan Malek (dmalek@jlc.net)
+ *
+ * Copyright (c) 1999,2000 Wolfgang Denk (wd@denx.de)
+ */
+#ifndef __MACH_TQM8xx_DEFS
+#define __MACH_TQM8xx_DEFS
+
+#ifndef __ASSEMBLY__
+
+typedef void (interrupt_handler_t)(void *);
+
+typedef struct serial_io {
+ int (*getc)(void);
+ int (*tstc)(void);
+ void (*putc)(const char c);
+ void (*printf)(const char *fmt, ...);
+} serial_io_t;
+
+typedef struct intr_util {
+ void (*install_hdlr)(int, interrupt_handler_t *, void *);
+ void (*free_hdlr)(int);
+} intr_util_t;
+
+
+/* A Board Information structure that is given to a program when
+ * ppcboot starts it up.
+ */
+typedef struct bd_info {
+ unsigned long bi_memstart; /* start of DRAM memory */
+ unsigned long bi_memsize; /* size of DRAM memory in bytes */
+ unsigned long bi_flashstart; /* start of FLASH memory */
+ unsigned long bi_flashsize; /* size of FLASH memory */
+ unsigned long bi_flashoffset; /* reserved area for startup monitor */
+ unsigned long bi_sramstart; /* start of SRAM memory */
+ unsigned long bi_sramsize; /* size of SRAM memory */
+ unsigned long bi_immr_base; /* base of IMMR register */
+ unsigned long bi_bootflags; /* boot / reboot flag (for LynxOS) */
+ unsigned long bi_ip_addr; /* IP Address */
+ unsigned char bi_enetaddr[6]; /* Ethernet adress */
+ unsigned char bi_reserved[2]; /* -- just for alignment -- */
+ unsigned long bi_intfreq; /* Internal Freq, in MHz */
+ unsigned long bi_busfreq; /* Bus Freq, in MHz */
+ unsigned long bi_baudrate; /* Console Baudrate */
+ serial_io_t bi_serial_io; /* Addr of monitor fnc for Console I/O */
+ intr_util_t bi_interrupt; /* Addr of monitor fnc for Interrupts */
+} bd_t;
+
+#endif /* __ASSEMBLY__ */
+
+#define TQM_IMMR_BASE 0xFFF00000 /* phys. addr of IMMR */
+#define TQM_IMAP_SIZE (64 * 1024) /* size of mapped area */
+
+#define IMAP_ADDR TQM_IMMR_BASE /* physical base address of IMMR area */
+#define IMAP_SIZE TQM_IMAP_SIZE /* mapped size of IMMR area */
+
+/* We don't use the 8259.
+*/
+#define NR_8259_INTS 0
+
+/* Generic 8xx type
+*/
+#if defined(CONFIG_TQM8xxL)
+#define _MACH_8xx (_MACH_tqm8xxL)
+#endif
+#if defined(CONFIG_TQM860)
+#define _MACH_8xx (_MACH_tqm860)
+#endif
+
+#endif /* __MACH_TQM8xx_DEFS */
diff --git a/include/asm-ppc/tqm8xxL.h b/include/asm-ppc/tqm8xxL.h
deleted file mode 100644
index 338396aa6..000000000
--- a/include/asm-ppc/tqm8xxL.h
+++ /dev/null
@@ -1,68 +0,0 @@
-
-/*
- * A collection of structures, addresses, and values associated with
- * the TQ Systems TQM850L modules. This was originally created for the
- * MBX860, and probably needs revisions for other boards (like the 821).
- * When this file gets out of control, we can split it up into more
- * meaningful pieces.
- *
- * Based on mbx.h, Copyright (c) 1997 Dan Malek (dmalek@jlc.net)
- *
- * Copyright (c) 1999 Wolfgang Denk (wd@denx.de)
- */
-#ifdef __KERNEL__
-#ifndef __MACH_TQM8xxL_DEFS
-#define __MACH_TQM8xxL_DEFS
-
-/* A Board Information structure that is given to a program when
- * EPPC-Bug starts it up.
- */
-typedef struct bd_info {
- unsigned long bi_memstart; /* start of DRAM memory */
- unsigned long bi_memsize; /* size of DRAM memory in bytes */
- unsigned long bi_flashstart; /* start of FLASH memory */
- unsigned long bi_flashsize; /* size of FLASH memory */
- unsigned long bi_flashoffset; /* reserved area for startup monitor */
- unsigned long bi_sramstart; /* start of SRAM memory */
- unsigned long bi_sramsize; /* size of SRAM memory */
- unsigned long bi_immr_base; /* base of IMMR register */
- unsigned long bi_bootflags; /* boot / reboot flag (for LynxOS) */
- unsigned long bi_ip_addr; /* IP Address */
- unsigned char bi_enetaddr[6]; /* Ethernet adress */
- unsigned char bi_reserved[2]; /* -- just for alignment -- */
- unsigned long bi_putchar; /* Addr of monitor putchar() to Console */
- unsigned long bi_intfreq; /* Internal Freq, in MHz */
- unsigned long bi_busfreq; /* Bus Freq, in MHz */
- unsigned long bi_baudrate; /* Console Baudrate */
-} bd_t;
-
-/* Configuration options for TQ Systems TQM850L mini module
- */
-
-#define TQM_RESET_ADDR 0x40000100 /* Monitor Reset Entry */
-
-#define TQM_IMMR_BASE 0xFFF00000 /* phys. addr of IMMR */
-#define TQM_IMAP_SIZE (64 * 1024) /* size of mapped area */
-
-#define TQM_CLOCKRATE 50 /* 50 MHz Clock */
-/*#define TQM_BAUDRATE 115200 */ /* Console baud rate */
-#define TQM_BAUDRATE 38400 /* Console baud rate */
-#define TQM_IP_ADDR 0x0A000063 /* IP addr: 10.0.0.99 */
-
-#define TQM_SERVER_IP "10.0.0.2" /* NFS server IP addr */
-#define TQM_SERVER_DIR "/LinuxPPC" /* NFS exported root */
-
-#define IMAP_ADDR TQM_IMMR_BASE /* physical base address of IMMR area */
-#define IMAP_SIZE TQM_IMAP_SIZE /* mapped size of IMMR area */
-
-/* We don't use the 8259.
-*/
-#define NR_8259_INTS 0
-
-/* Generic 8xx type
-*/
-#define _MACH_8xx (_MACH_tqm8xxL)
-
-#endif /* __MACH_TQM8xxL_DEFS */
-
-#endif /* __KERNEL__ */