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 From 091904ae5fc6f018680f83d71301ceac4f39d77f Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Wed, 1 Feb 2006 03:06:01 -0800 Subject: [PATCH] sh: Move TRA/EXPEVT/INTEVT definitions for reuse Currently entry.S is home to these definitions, so we move them somewhere more sensible. IPR IRQ handling depends on being to read from INTEVT. Signed-off-by: Paul Mundt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-sh/cpu-sh3/mmu_context.h | 10 ++++++++++ include/asm-sh/cpu-sh4/mmu_context.h | 8 ++++++++ 2 files changed, 18 insertions(+) (limited to 'include/asm-sh') diff --git a/include/asm-sh/cpu-sh3/mmu_context.h b/include/asm-sh/cpu-sh3/mmu_context.h index 5cfaa6bcf1ed..a844ea0965b6 100644 --- a/include/asm-sh/cpu-sh3/mmu_context.h +++ b/include/asm-sh/cpu-sh3/mmu_context.h @@ -24,5 +24,15 @@ #define MMU_NTLB_WAYS 4 #define MMU_CONTROL_INIT 0x007 /* SV=0, TF=1, IX=1, AT=1 */ +#define TRA 0xffffffd0 +#define EXPEVT 0xffffffd4 + +#if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) || \ + defined(CONFIG_CPU_SUBTYPE_SH7300) || defined(CONFIG_CPU_SUBTYPE_SH7705) +#define INTEVT 0xa4000000 /* INTEVTE2(0xa4000000) */ +#else +#define INTEVT 0xffffffd8 +#endif + #endif /* __ASM_CPU_SH3_MMU_CONTEXT_H */ diff --git a/include/asm-sh/cpu-sh4/mmu_context.h b/include/asm-sh/cpu-sh4/mmu_context.h index 5b64d041f0b9..ff4c5fbbfaf0 100644 --- a/include/asm-sh/cpu-sh4/mmu_context.h +++ b/include/asm-sh/cpu-sh4/mmu_context.h @@ -23,7 +23,11 @@ #define MMU_PAGE_ASSOC_BIT 0x80 #define MMU_NTLB_ENTRIES 64 /* for 7750 */ +#ifdef CONFIG_SH_STORE_QUEUES +#define MMU_CONTROL_INIT 0x05 /* SQMD=0, SV=0, TI=1, AT=1 */ +#else #define MMU_CONTROL_INIT 0x205 /* SQMD=1, SV=0, TI=1, AT=1 */ +#endif #define MMU_ITLB_DATA_ARRAY 0xF3000000 #define MMU_UTLB_DATA_ARRAY 0xF7000000 @@ -35,5 +39,9 @@ #define MMU_I_ENTRY_SHIFT 8 #define MMU_ITLB_VALID 0x100 +#define TRA 0xff000020 +#define EXPEVT 0xff000024 +#define INTEVT 0xff000028 + #endif /* __ASM_CPU_SH4_MMU_CONTEXT_H */ -- cgit v1.2.3 From de02797aa744c96a90f47be7bc081ce2f74b17fd Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Wed, 1 Feb 2006 03:06:02 -0800 Subject: [PATCH] sh: Cleanup struct sh_cpuinfo for clock framework changes Now that the clock framework changes have been integrated, the manual clock accounting that was done in sh_cpuinfo can be dropped. Also correct a bug with running past the end of the CPU flags when there's a mismatch between the added flags and printed ones. Signed-off-by: Paul Mundt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-sh/processor.h | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) (limited to 'include/asm-sh') diff --git a/include/asm-sh/processor.h b/include/asm-sh/processor.h index c4904797d6df..fa5bd2d8803e 100644 --- a/include/asm-sh/processor.h +++ b/include/asm-sh/processor.h @@ -12,7 +12,6 @@ #include #include #include -#include #include /* @@ -30,7 +29,7 @@ * CPU type and hardware bug flags. Kept separately for each CPU. * * Each one of these also needs a CONFIG_CPU_SUBTYPE_xxx entry - * in arch/sh/Kconfig, as well as an entry in arch/sh/kernel/setup.c + * in arch/sh/mm/Kconfig, as well as an entry in arch/sh/kernel/setup.c * for parsing the subtype in get_cpu_subtype(). */ enum cpu_type { @@ -44,7 +43,7 @@ enum cpu_type { /* SH-4 types */ CPU_SH7750, CPU_SH7750S, CPU_SH7750R, CPU_SH7751, CPU_SH7751R, CPU_SH7760, CPU_ST40RA, CPU_ST40GX1, CPU_SH4_202, CPU_SH4_501, - CPU_SH73180, + CPU_SH73180, CPU_SH7770, CPU_SH7780, CPU_SH7781, /* Unknown subtype */ CPU_SH_NONE @@ -52,14 +51,8 @@ enum cpu_type { struct sh_cpuinfo { enum cpu_type type; - char hard_math; unsigned long loops_per_jiffy; - unsigned int cpu_clock, master_clock, bus_clock, module_clock; -#ifdef CONFIG_CPU_SUBTYPE_ST40STB1 - unsigned int memory_clock; -#endif - struct cache_info icache; struct cache_info dcache; @@ -131,7 +124,7 @@ union sh_fpu_union { struct sh_fpu_soft_struct soft; }; -/* +/* * Processor flags */ @@ -140,6 +133,7 @@ union sh_fpu_union { #define CPU_HAS_MMU_PAGE_ASSOC 0x0004 /* SH3: TLB way selection bit support */ #define CPU_HAS_DSP 0x0008 /* SH-DSP: DSP support */ #define CPU_HAS_PERF_COUNTER 0x0010 /* Hardware performance counters */ +#define CPU_HAS_PTEA 0x0020 /* PTEA register */ struct thread_struct { unsigned long sp; @@ -160,10 +154,10 @@ extern int ubc_usercnt; #define INIT_THREAD { \ sizeof(init_stack) + (long) &init_stack, /* sp */ \ 0, /* pc */ \ - 0, 0, \ - 0, \ - 0, \ - {{{0,}},} /* fpu state */ \ + 0, 0, \ + 0, \ + 0, \ + {{{0,}},} /* fpu state */ \ } /* @@ -171,7 +165,7 @@ extern int ubc_usercnt; */ #define start_thread(regs, new_pc, new_sp) \ set_fs(USER_DS); \ - regs->pr = 0; \ + regs->pr = 0; \ regs->sr = SR_FD; /* User mode. */ \ regs->pc = new_pc; \ regs->regs[15] = new_sp @@ -239,16 +233,16 @@ extern void save_fpu(struct task_struct *__tsk, struct pt_regs *regs); #define save_fpu(tsk) do { } while (0) #endif -#define unlazy_fpu(tsk, regs) do { \ +#define unlazy_fpu(tsk, regs) do { \ if (test_tsk_thread_flag(tsk, TIF_USEDFPU)) { \ - save_fpu(tsk, regs); \ + save_fpu(tsk, regs); \ } \ } while (0) -#define clear_fpu(tsk, regs) do { \ - if (test_tsk_thread_flag(tsk, TIF_USEDFPU)) { \ - clear_tsk_thread_flag(tsk, TIF_USEDFPU); \ - release_fpu(regs); \ +#define clear_fpu(tsk, regs) do { \ + if (test_tsk_thread_flag(tsk, TIF_USEDFPU)) { \ + clear_tsk_thread_flag(tsk, TIF_USEDFPU); \ + release_fpu(regs); \ } \ } while (0) -- cgit v1.2.3 From 8d27e08191379b7a3302a33a6efdb8bdfd319c95 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Wed, 1 Feb 2006 03:06:04 -0800 Subject: [PATCH] sh: drop maskpos from make_ipr_irq(), remove duplicate irq definitions Clean up some of the subtype IRQ definitions for IPR IRQ, and consolidate the make_ipr_irq() definitions by dropping maskpos. SH-4A was the only thing interested in the maskpos, and this should be handled through INTC2 rather than IPR. Signed-off-by: Paul Mundt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-sh/irq-sh73180.h | 36 +----------------------------------- include/asm-sh/irq-sh7780.h | 23 ----------------------- include/asm-sh/irq.h | 10 ++++++++-- 3 files changed, 9 insertions(+), 60 deletions(-) (limited to 'include/asm-sh') diff --git a/include/asm-sh/irq-sh73180.h b/include/asm-sh/irq-sh73180.h index bf2e4310ffac..d705252be260 100644 --- a/include/asm-sh/irq-sh73180.h +++ b/include/asm-sh/irq-sh73180.h @@ -25,11 +25,6 @@ #undef DMA_IPR_POS #undef DMA_PRIORITY -#undef NR_IRQS - -#undef __irq_demux -#undef irq_demux - #undef INTC_IMCR0 #undef INTC_IMCR1 #undef INTC_IMCR2 @@ -229,33 +224,6 @@ #define SIU_IPR_POS 1 #define SIU_PRIORITY 3 - -/* ONCHIP_NR_IRQS */ -#define NR_IRQS 109 - -/* In a generic kernel, NR_IRQS is an upper bound, and we should use - * ACTUAL_NR_IRQS (which uses the machine vector) to get the correct value. - */ -#define ACTUAL_NR_IRQS NR_IRQS - - -extern void disable_irq(unsigned int); -extern void disable_irq_nosync(unsigned int); -extern void enable_irq(unsigned int); - -/* - * Simple Mask Register Support - */ -extern void make_maskreg_irq(unsigned int irq); -extern unsigned short *irq_mask_register; - -/* - * Function for "on chip support modules". - */ -extern void make_ipr_irq(unsigned int irq, unsigned int addr, - int pos, int priority); -extern void make_imask_irq(unsigned int irq); - #define PORT_PACR 0xA4050100UL #define PORT_PBCR 0xA4050102UL #define PORT_PCCR 0xA4050104UL @@ -343,8 +311,6 @@ extern void make_imask_irq(unsigned int irq); #define IRQ6_PRIORITY 1 #define IRQ7_PRIORITY 1 -extern int shmse_irq_demux(int irq); -#define __irq_demux(irq) shmse_irq_demux(irq) -#define irq_demux(irq) __irq_demux(irq) +int shmse_irq_demux(int irq); #endif /* __ASM_SH_IRQ_SH73180_H */ diff --git a/include/asm-sh/irq-sh7780.h b/include/asm-sh/irq-sh7780.h index 8c8ca1281084..7f90315cd830 100644 --- a/include/asm-sh/irq-sh7780.h +++ b/include/asm-sh/irq-sh7780.h @@ -299,29 +299,6 @@ #define GPIO_IPR_POS 2 #define GPIO_PRIORITY 3 -/* ONCHIP_NR_IRQS */ -#define NR_IRQS 150 /* 111 + 16 */ - -/* In a generic kernel, NR_IRQS is an upper bound, and we should use - * ACTUAL_NR_IRQS (which uses the machine vector) to get the correct value. - */ -#define ACTUAL_NR_IRQS NR_IRQS - -extern void disable_irq(unsigned int); -extern void disable_irq_nosync(unsigned int); -extern void enable_irq(unsigned int); - -/* - * Simple Mask Register Support - */ -extern void make_maskreg_irq(unsigned int irq); -extern unsigned short *irq_mask_register; - -/* - * Function for "on chip support modules". - */ -extern void make_imask_irq(unsigned int irq); - #define INTC_TMU0_MSK 0 #define INTC_TMU3_MSK 1 #define INTC_RTC_MSK 2 diff --git a/include/asm-sh/irq.h b/include/asm-sh/irq.h index 060ec3c27207..42b8394c04ed 100644 --- a/include/asm-sh/irq.h +++ b/include/asm-sh/irq.h @@ -245,6 +245,7 @@ #endif /* ST40STB1 */ #endif /* 775x / SH4-202 / ST40STB1 */ +#endif /* 7780 */ /* NR_IRQS is made from three components: * 1. ONCHIP_NR_IRQS - number of IRLS + on-chip peripherial modules @@ -274,8 +275,11 @@ # define ONCHIP_NR_IRQS 72 #elif defined(CONFIG_CPU_SUBTYPE_ST40STB1) # define ONCHIP_NR_IRQS 144 -#elif defined(CONFIG_CPU_SUBTYPE_SH7300) +#elif defined(CONFIG_CPU_SUBTYPE_SH7300) || \ + defined(CONFIG_CPU_SUBTYPE_SH73180) # define ONCHIP_NR_IRQS 109 +#elif defined(CONFIG_CPU_SUBTYPE_SH7780) +# define ONCHIP_NR_IRQS 111 #elif defined(CONFIG_SH_UNKNOWN) /* Most be last */ # define ONCHIP_NR_IRQS 144 #endif @@ -306,6 +310,8 @@ # define OFFCHIP_NR_IRQS 96 #elif defined (CONFIG_SH_TITAN) # define OFFCHIP_NR_IRQS 4 +#elif defined(CONFIG_SH_R7780RP) +# define OFFCHIP_NR_IRQS 16 #elif defined(CONFIG_SH_UNKNOWN) # define OFFCHIP_NR_IRQS 16 /* Must also be last */ #else @@ -550,7 +556,7 @@ extern int ipr_irq_demux(int irq); #define INTC_ICR_IRLM (1<<7) #endif -#else +#ifdef CONFIG_CPU_SUBTYPE_SH7780 #include #endif -- cgit v1.2.3 From 37cc7943788c841b03a48c00751dfac0ad9f5b12 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Wed, 1 Feb 2006 03:06:05 -0800 Subject: [PATCH] sh: convert voyagergx to platform device, drop sh-bus Trivial patch updating the voyagergx cchip code to reference a platform device instead, now that the dma mask is taken care of. Given this, there's no longer any reason to drag around the SH-bus code, so kill that off entirely. Signed-off-by: Manuel Lauss Signed-off-by: Paul Mundt Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-sh/bus-sh.h | 66 ------------------------------------------------- 1 file changed, 66 deletions(-) delete mode 100644 include/asm-sh/bus-sh.h (limited to 'include/asm-sh') diff --git a/include/asm-sh/bus-sh.h b/include/asm-sh/bus-sh.h deleted file mode 100644 index e42d63b65cb5..000000000000 --- a/include/asm-sh/bus-sh.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * include/asm-sh/bus-sh.h - * - * Copyright (C) 2004 Paul Mundt - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - */ -#ifndef __ASM_SH_BUS_SH_H -#define __ASM_SH_BUS_SH_H - -extern struct bus_type sh_bus_types[]; - -struct sh_dev { - struct device dev; - char *name; - unsigned int dev_id; - unsigned int bus_id; - struct resource res; - void *mapbase; - unsigned int irq[6]; - u64 *dma_mask; - u64 coherent_dma_mask; -}; - -#define to_sh_dev(d) container_of((d), struct sh_dev, dev) - -#define sh_get_drvdata(d) dev_get_drvdata(&(d)->dev) -#define sh_set_drvdata(d,p) dev_set_drvdata(&(d)->dev, (p)) - -struct sh_driver { - struct device_driver drv; - unsigned int dev_id; - unsigned int bus_id; - int (*probe)(struct sh_dev *); - int (*remove)(struct sh_dev *); - int (*suspend)(struct sh_dev *, pm_message_t); - int (*resume)(struct sh_dev *); -}; - -#define to_sh_driver(d) container_of((d), struct sh_driver, drv) -#define sh_name(d) ((d)->dev.driver->name) - -/* - * Device ID numbers for bus types - */ -enum { - SH_DEV_ID_USB_OHCI, -}; - -#define SH_NR_BUSES 1 -#define SH_BUS_NAME_VIRT "shbus" - -enum { - SH_BUS_VIRT, -}; - -/* arch/sh/kernel/cpu/bus.c */ -extern int sh_device_register(struct sh_dev *dev); -extern void sh_device_unregister(struct sh_dev *dev); -extern int sh_driver_register(struct sh_driver *drv); -extern void sh_driver_unregister(struct sh_driver *drv); - -#endif /* __ASM_SH_BUS_SH_H */ - -- cgit v1.2.3 From 87f55e67dc1be000fa76009532906b168a80b3dd Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Wed, 1 Feb 2006 03:06:09 -0800 Subject: [PATCH] sh/sh64: Fix bogus TIOCGICOUNT definitions As reported by Russell King, sh and sh64 currently have bogus definitions for TIOCGICOUNT, particularly referencing a kernel only structure. Switch to using a sensible ioctl value. Signed-off-by: Paul Mundt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-sh/ioctls.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/asm-sh') diff --git a/include/asm-sh/ioctls.h b/include/asm-sh/ioctls.h index 1866f3f90028..9d84a2d445a2 100644 --- a/include/asm-sh/ioctls.h +++ b/include/asm-sh/ioctls.h @@ -94,6 +94,6 @@ #define TIOCSERSETMULTI _IOW('T', 91, struct serial_multiport_struct) /* 0x545B */ /* Set multiport config */ #define TIOCMIWAIT _IO('T', 92) /* 0x545C */ /* wait for a change on serial input line(s) */ -#define TIOCGICOUNT _IOR('T', 93, struct async_icount) /* 0x545D */ /* read serial port inline interrupt counts */ +#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ #endif /* __ASM_SH_IOCTLS_H */ -- cgit v1.2.3