patch-2.4.10 linux/include/asm-ppc/tqm8xx.h

Next file: linux/include/asm-ppc/uaccess.h
Previous file: linux/include/asm-ppc/timex.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.9/linux/include/asm-ppc/tqm8xx.h linux/include/asm-ppc/tqm8xx.h
@@ -1,81 +1,54 @@
 /*
- * BK Id: SCCS/s.tqm8xx.h 1.6 05/17/01 18:14:26 cort
+ * BK Id: SCCS/s.tqm8xx.h 1.8 08/30/01 09:01:04 trini
  */
 /*
- * 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)
+ * TQM8xx(L) board specific definitions
+ * 
+ * Copyright (c) 1999,2000,2001 Wolfgang Denk (wd@denx.de)
  */
-#ifndef __MACH_TQM8xx_DEFS
-#define __MACH_TQM8xx_DEFS
 
-#include <linux/config.h>
+#ifndef __MACH_TQM8xx_H
+#define __MACH_TQM8xx_H
 
-#ifndef __ASSEMBLY__
+#include <linux/config.h>
+ 
+#include <asm/ppcboot.h>
 
-typedef	void (interrupt_handler_t)(void *);
+#define	TQM_IMMR_BASE	0xFFF00000	/* phys. addr of IMMR */
+#define	TQM_IMAP_SIZE	(64 * 1024)	/* size of mapped area */
 
-typedef struct serial_io {
-	int	(*getc)(void);
-	int	(*tstc)(void);
-	void	(*putc)(const char c);
-	void	(*printf)(const char *fmt, ...);
-} serial_io_t;
+#define	IMAP_ADDR	TQM_IMMR_BASE	/* physical base address of IMMR area */
+#define IMAP_SIZE	TQM_IMAP_SIZE	/* mapped size of IMMR area */
 
-typedef struct intr_util {
-	void	(*install_hdlr)(int, interrupt_handler_t *, void *);
-	void	(*free_hdlr)(int);
-} intr_util_t;
+/*-----------------------------------------------------------------------
+ * PCMCIA stuff
+ *-----------------------------------------------------------------------
+ *
+ */
+#define PCMCIA_MEM_SIZE		( 64 << 20 )
 
+#define	MAX_HWIFS	1	/* overwrite default in include/asm-ppc/ide.h */
 
-/* A Board Information structure that is given to a program when
- * ppcboot starts it up.
+/*
+ * Definitions for IDE0 Interface
  */
-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 IDE0_BASE_OFFSET		0
+#define IDE0_DATA_REG_OFFSET		(PCMCIA_MEM_SIZE + 0x320)
+#define IDE0_ERROR_REG_OFFSET		(2 * PCMCIA_MEM_SIZE + 0x320 + 1)
+#define IDE0_NSECTOR_REG_OFFSET		(2 * PCMCIA_MEM_SIZE + 0x320 + 2)
+#define IDE0_SECTOR_REG_OFFSET		(2 * PCMCIA_MEM_SIZE + 0x320 + 3)
+#define IDE0_LCYL_REG_OFFSET		(2 * PCMCIA_MEM_SIZE + 0x320 + 4)
+#define IDE0_HCYL_REG_OFFSET		(2 * PCMCIA_MEM_SIZE + 0x320 + 5)
+#define IDE0_SELECT_REG_OFFSET		(2 * PCMCIA_MEM_SIZE + 0x320 + 6)
+#define IDE0_STATUS_REG_OFFSET		(2 * PCMCIA_MEM_SIZE + 0x320 + 7)
+#define IDE0_CONTROL_REG_OFFSET		0x0106
+#define IDE0_IRQ_REG_OFFSET		0x000A	/* not used */
 
-#define	TQM_IMMR_BASE	0xFFF00000	/* phys. addr of IMMR			*/
-#define	TQM_IMAP_SIZE	(64 * 1024)	/* size of mapped area			*/
+#define	IDE0_INTERRUPT			13
 
-#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 */
+#endif	/* __MACH_TQM8xx_H */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)