From 740172947b315fa97f8d29b0b9809b1ea1201642 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Wed, 1 Feb 2006 03:05:59 -0800 Subject: [PATCH] sh: SH4-202 microdev updates A few trivial updates for the microdev board support code: - Update for __IO_PREFIX changes. - Consolidate headers into a single microdev.h. - Update the microdev_defconfig. - Add init values for the S1D13806 used by s1d13xxxfb. Signed-off-by: Paul Mundt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-sh/microdev.h | 80 +++++++++++++++++++++++++++++++++++++++++++ include/asm-sh/microdev/io.h | 53 ---------------------------- include/asm-sh/microdev/irq.h | 72 -------------------------------------- 3 files changed, 80 insertions(+), 125 deletions(-) create mode 100644 include/asm-sh/microdev.h delete mode 100644 include/asm-sh/microdev/io.h delete mode 100644 include/asm-sh/microdev/irq.h (limited to 'include/asm-sh') diff --git a/include/asm-sh/microdev.h b/include/asm-sh/microdev.h new file mode 100644 index 000000000000..018332a9e590 --- /dev/null +++ b/include/asm-sh/microdev.h @@ -0,0 +1,80 @@ +/* + * linux/include/asm-sh/microdev.h + * + * Copyright (C) 2003 Sean McGoogan (Sean.McGoogan@superh.com) + * + * Definitions for the SuperH SH4-202 MicroDev board. + * + * May be copied or modified under the terms of the GNU General Public + * License. See linux/COPYING for more information. + */ +#ifndef __ASM_SH_MICRODEV_H +#define __ASM_SH_MICRODEV_H + +extern void init_microdev_irq(void); +extern void microdev_print_fpga_intc_status(void); + +/* + * The following are useful macros for manipulating the interrupt + * controller (INTC) on the CPU-board FPGA. should be noted that there + * is an INTC on the FPGA, and a seperate INTC on the SH4-202 core - + * these are two different things, both of which need to be prorammed to + * correctly route - unfortunately, they have the same name and + * abbreviations! + */ +#define MICRODEV_FPGA_INTC_BASE 0xa6110000ul /* INTC base address on CPU-board FPGA */ +#define MICRODEV_FPGA_INTENB_REG (MICRODEV_FPGA_INTC_BASE+0ul) /* Interrupt Enable Register on INTC on CPU-board FPGA */ +#define MICRODEV_FPGA_INTDSB_REG (MICRODEV_FPGA_INTC_BASE+8ul) /* Interrupt Disable Register on INTC on CPU-board FPGA */ +#define MICRODEV_FPGA_INTC_MASK(n) (1ul<<(n)) /* Interupt mask to enable/disable INTC in CPU-board FPGA */ +#define MICRODEV_FPGA_INTPRI_REG(n) (MICRODEV_FPGA_INTC_BASE+0x10+((n)/8)*8)/* Interrupt Priority Register on INTC on CPU-board FPGA */ +#define MICRODEV_FPGA_INTPRI_LEVEL(n,x) ((x)<<(((n)%8)*4)) /* MICRODEV_FPGA_INTPRI_LEVEL(int_number, int_level) */ +#define MICRODEV_FPGA_INTPRI_MASK(n) (MICRODEV_FPGA_INTPRI_LEVEL((n),0xful)) /* Interrupt Priority Mask on INTC on CPU-board FPGA */ +#define MICRODEV_FPGA_INTSRC_REG (MICRODEV_FPGA_INTC_BASE+0x30ul) /* Interrupt Source Register on INTC on CPU-board FPGA */ +#define MICRODEV_FPGA_INTREQ_REG (MICRODEV_FPGA_INTC_BASE+0x38ul) /* Interrupt Request Register on INTC on CPU-board FPGA */ + + +/* + * The following are the IRQ numbers for the Linux Kernel for external + * interrupts. i.e. the numbers seen by 'cat /proc/interrupt'. + */ +#define MICRODEV_LINUX_IRQ_KEYBOARD 1 /* SuperIO Keyboard */ +#define MICRODEV_LINUX_IRQ_SERIAL1 2 /* SuperIO Serial #1 */ +#define MICRODEV_LINUX_IRQ_ETHERNET 3 /* on-board Ethnernet */ +#define MICRODEV_LINUX_IRQ_SERIAL2 4 /* SuperIO Serial #2 */ +#define MICRODEV_LINUX_IRQ_USB_HC 7 /* on-board USB HC */ +#define MICRODEV_LINUX_IRQ_MOUSE 12 /* SuperIO PS/2 Mouse */ +#define MICRODEV_LINUX_IRQ_IDE2 13 /* SuperIO IDE #2 */ +#define MICRODEV_LINUX_IRQ_IDE1 14 /* SuperIO IDE #1 */ + +/* + * The following are the IRQ numbers for the INTC on the FPGA for + * external interrupts. i.e. the bits in the INTC registers in the + * FPGA. + */ +#define MICRODEV_FPGA_IRQ_KEYBOARD 1 /* SuperIO Keyboard */ +#define MICRODEV_FPGA_IRQ_SERIAL1 3 /* SuperIO Serial #1 */ +#define MICRODEV_FPGA_IRQ_SERIAL2 4 /* SuperIO Serial #2 */ +#define MICRODEV_FPGA_IRQ_MOUSE 12 /* SuperIO PS/2 Mouse */ +#define MICRODEV_FPGA_IRQ_IDE1 14 /* SuperIO IDE #1 */ +#define MICRODEV_FPGA_IRQ_IDE2 15 /* SuperIO IDE #2 */ +#define MICRODEV_FPGA_IRQ_USB_HC 16 /* on-board USB HC */ +#define MICRODEV_FPGA_IRQ_ETHERNET 18 /* on-board Ethnernet */ + +#define MICRODEV_IRQ_PCI_INTA 8 +#define MICRODEV_IRQ_PCI_INTB 9 +#define MICRODEV_IRQ_PCI_INTC 10 +#define MICRODEV_IRQ_PCI_INTD 11 + +#define __IO_PREFIX microdev +#include + +#if defined(CONFIG_PCI) +unsigned char microdev_pci_inb(unsigned long port); +unsigned short microdev_pci_inw(unsigned long port); +unsigned long microdev_pci_inl(unsigned long port); +void microdev_pci_outb(unsigned char data, unsigned long port); +void microdev_pci_outw(unsigned short data, unsigned long port); +void microdev_pci_outl(unsigned long data, unsigned long port); +#endif + +#endif /* __ASM_SH_MICRODEV_H */ diff --git a/include/asm-sh/microdev/io.h b/include/asm-sh/microdev/io.h deleted file mode 100644 index f2ca4ac8c88a..000000000000 --- a/include/asm-sh/microdev/io.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * linux/include/asm-sh/io_microdev.h - * - * Copyright (C) 2003 Sean McGoogan (Sean.McGoogan@superh.com) - * - * IO functions for the SuperH SH4-202 MicroDev board. - * - * May be copied or modified under the terms of the GNU General Public - * License. See linux/COPYING for more information. - * - */ - - -#ifndef _ASM_SH_IO_MICRODEV_H -#define _ASM_SH_IO_MICRODEV_H - -extern unsigned long microdev_isa_port2addr(unsigned long offset); - -extern unsigned char microdev_inb(unsigned long port); -extern unsigned short microdev_inw(unsigned long port); -extern unsigned int microdev_inl(unsigned long port); - -extern void microdev_outb(unsigned char value, unsigned long port); -extern void microdev_outw(unsigned short value, unsigned long port); -extern void microdev_outl(unsigned int value, unsigned long port); - -extern unsigned char microdev_inb_p(unsigned long port); -extern unsigned short microdev_inw_p(unsigned long port); -extern unsigned int microdev_inl_p(unsigned long port); - -extern void microdev_outb_p(unsigned char value, unsigned long port); -extern void microdev_outw_p(unsigned short value, unsigned long port); -extern void microdev_outl_p(unsigned int value, unsigned long port); - -extern void microdev_insb(unsigned long port, void *addr, unsigned long count); -extern void microdev_insw(unsigned long port, void *addr, unsigned long count); -extern void microdev_insl(unsigned long port, void *addr, unsigned long count); - -extern void microdev_outsb(unsigned long port, const void *addr, unsigned long count); -extern void microdev_outsw(unsigned long port, const void *addr, unsigned long count); -extern void microdev_outsl(unsigned long port, const void *addr, unsigned long count); - -#if defined(CONFIG_PCI) -extern unsigned char microdev_pci_inb(unsigned long port); -extern unsigned short microdev_pci_inw(unsigned long port); -extern unsigned long microdev_pci_inl(unsigned long port); -extern void microdev_pci_outb(unsigned char data, unsigned long port); -extern void microdev_pci_outw(unsigned short data, unsigned long port); -extern void microdev_pci_outl(unsigned long data, unsigned long port); -#endif - -#endif /* _ASM_SH_IO_MICRODEV_H */ - diff --git a/include/asm-sh/microdev/irq.h b/include/asm-sh/microdev/irq.h deleted file mode 100644 index 47f6f77a65f0..000000000000 --- a/include/asm-sh/microdev/irq.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * linux/include/asm-sh/irq_microdev.h - * - * Copyright (C) 2003 Sean McGoogan (Sean.McGoogan@superh.com) - * - * IRQ functions for the SuperH SH4-202 MicroDev board. - * - * May be copied or modified under the terms of the GNU General Public - * License. See linux/COPYING for more information. - * - */ - - -#ifndef _ASM_SH_IRQ_MICRODEV_H -#define _ASM_SH_IRQ_MICRODEV_H - -extern void init_microdev_irq(void); -extern void microdev_print_fpga_intc_status(void); - - - /* - * The following are useful macros for manipulating the - * interrupt controller (INTC) on the CPU-board FPGA. - * It should be noted that there is an INTC on the FPGA, - * and a seperate INTC on the SH4-202 core - these are - * two different things, both of which need to be prorammed - * to correctly route - unfortunately, they have the - * same name and abbreviations! - */ -#define MICRODEV_FPGA_INTC_BASE 0xa6110000ul /* INTC base address on CPU-board FPGA */ -#define MICRODEV_FPGA_INTENB_REG (MICRODEV_FPGA_INTC_BASE+0ul) /* Interrupt Enable Register on INTC on CPU-board FPGA */ -#define MICRODEV_FPGA_INTDSB_REG (MICRODEV_FPGA_INTC_BASE+8ul) /* Interrupt Disable Register on INTC on CPU-board FPGA */ -#define MICRODEV_FPGA_INTC_MASK(n) (1ul<<(n)) /* Interupt mask to enable/disable INTC in CPU-board FPGA */ -#define MICRODEV_FPGA_INTPRI_REG(n) (MICRODEV_FPGA_INTC_BASE+0x10+((n)/8)*8)/* Interrupt Priority Register on INTC on CPU-board FPGA */ -#define MICRODEV_FPGA_INTPRI_LEVEL(n,x) ((x)<<(((n)%8)*4)) /* MICRODEV_FPGA_INTPRI_LEVEL(int_number, int_level) */ -#define MICRODEV_FPGA_INTPRI_MASK(n) (MICRODEV_FPGA_INTPRI_LEVEL((n),0xful)) /* Interrupt Priority Mask on INTC on CPU-board FPGA */ -#define MICRODEV_FPGA_INTSRC_REG (MICRODEV_FPGA_INTC_BASE+0x30ul) /* Interrupt Source Register on INTC on CPU-board FPGA */ -#define MICRODEV_FPGA_INTREQ_REG (MICRODEV_FPGA_INTC_BASE+0x38ul) /* Interrupt Request Register on INTC on CPU-board FPGA */ - - - /* - * The following are the IRQ numbers for the Linux Kernel for external interrupts. - * i.e. the numbers seen by 'cat /proc/interrupt'. - */ -#define MICRODEV_LINUX_IRQ_KEYBOARD 1 /* SuperIO Keyboard */ -#define MICRODEV_LINUX_IRQ_SERIAL1 2 /* SuperIO Serial #1 */ -#define MICRODEV_LINUX_IRQ_ETHERNET 3 /* on-board Ethnernet */ -#define MICRODEV_LINUX_IRQ_SERIAL2 4 /* SuperIO Serial #2 */ -#define MICRODEV_LINUX_IRQ_USB_HC 7 /* on-board USB HC */ -#define MICRODEV_LINUX_IRQ_MOUSE 12 /* SuperIO PS/2 Mouse */ -#define MICRODEV_LINUX_IRQ_IDE2 13 /* SuperIO IDE #2 */ -#define MICRODEV_LINUX_IRQ_IDE1 14 /* SuperIO IDE #1 */ - - /* - * The following are the IRQ numbers for the INTC on the FPGA for external interrupts. - * i.e. the bits in the INTC registers in the FPGA. - */ -#define MICRODEV_FPGA_IRQ_KEYBOARD 1 /* SuperIO Keyboard */ -#define MICRODEV_FPGA_IRQ_SERIAL1 3 /* SuperIO Serial #1 */ -#define MICRODEV_FPGA_IRQ_SERIAL2 4 /* SuperIO Serial #2 */ -#define MICRODEV_FPGA_IRQ_MOUSE 12 /* SuperIO PS/2 Mouse */ -#define MICRODEV_FPGA_IRQ_IDE1 14 /* SuperIO IDE #1 */ -#define MICRODEV_FPGA_IRQ_IDE2 15 /* SuperIO IDE #2 */ -#define MICRODEV_FPGA_IRQ_USB_HC 16 /* on-board USB HC */ -#define MICRODEV_FPGA_IRQ_ETHERNET 18 /* on-board Ethnernet */ - -#define MICRODEV_IRQ_PCI_INTA 8 -#define MICRODEV_IRQ_PCI_INTB 9 -#define MICRODEV_IRQ_PCI_INTC 10 -#define MICRODEV_IRQ_PCI_INTD 11 - -#endif /* _ASM_SH_IRQ_MICRODEV_H */ -- cgit v1.2.3