diff options
| author | Steve French <sfrench@us.ibm.com> | 2006-02-01 15:16:53 -0500 |
|---|---|---|
| committer | Steve French <sfrench@us.ibm.com> | 2006-02-01 15:16:53 -0500 |
| commit | e6da74e1f20ea7822e52a9e4fbd3d25bd907e471 (patch) | |
| tree | d9b3bc7e654fb788d1cf3a1759b1b3c74cc56a04 /include/asm-sh | |
| parent | 1877c9ea66a29563987f22d0a86c66f438a87ce2 (diff) | |
| parent | 3c3b809e256c417847f1a96b2f9d9f66c7fcb02c (diff) | |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'include/asm-sh')
| -rw-r--r-- | include/asm-sh/bus-sh.h | 66 | ||||
| -rw-r--r-- | include/asm-sh/cpu-sh3/mmu_context.h | 10 | ||||
| -rw-r--r-- | include/asm-sh/cpu-sh4/mmu_context.h | 8 | ||||
| -rw-r--r-- | include/asm-sh/ioctls.h | 2 | ||||
| -rw-r--r-- | include/asm-sh/irq-sh73180.h | 36 | ||||
| -rw-r--r-- | include/asm-sh/irq-sh7780.h | 23 | ||||
| -rw-r--r-- | include/asm-sh/irq.h | 10 | ||||
| -rw-r--r-- | include/asm-sh/microdev.h (renamed from include/asm-sh/microdev/irq.h) | 60 | ||||
| -rw-r--r-- | include/asm-sh/microdev/io.h | 53 | ||||
| -rw-r--r-- | include/asm-sh/processor.h | 36 |
10 files changed, 77 insertions, 227 deletions
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 @@ | |||
| 1 | /* | ||
| 2 | * include/asm-sh/bus-sh.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2004 Paul Mundt | ||
| 5 | * | ||
| 6 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 7 | * License. See the file "COPYING" in the main directory of this archive | ||
| 8 | * for more details. | ||
| 9 | */ | ||
| 10 | #ifndef __ASM_SH_BUS_SH_H | ||
| 11 | #define __ASM_SH_BUS_SH_H | ||
| 12 | |||
| 13 | extern struct bus_type sh_bus_types[]; | ||
| 14 | |||
| 15 | struct sh_dev { | ||
| 16 | struct device dev; | ||
| 17 | char *name; | ||
| 18 | unsigned int dev_id; | ||
| 19 | unsigned int bus_id; | ||
| 20 | struct resource res; | ||
| 21 | void *mapbase; | ||
| 22 | unsigned int irq[6]; | ||
| 23 | u64 *dma_mask; | ||
| 24 | u64 coherent_dma_mask; | ||
| 25 | }; | ||
| 26 | |||
| 27 | #define to_sh_dev(d) container_of((d), struct sh_dev, dev) | ||
| 28 | |||
| 29 | #define sh_get_drvdata(d) dev_get_drvdata(&(d)->dev) | ||
| 30 | #define sh_set_drvdata(d,p) dev_set_drvdata(&(d)->dev, (p)) | ||
| 31 | |||
| 32 | struct sh_driver { | ||
| 33 | struct device_driver drv; | ||
| 34 | unsigned int dev_id; | ||
| 35 | unsigned int bus_id; | ||
| 36 | int (*probe)(struct sh_dev *); | ||
| 37 | int (*remove)(struct sh_dev *); | ||
| 38 | int (*suspend)(struct sh_dev *, pm_message_t); | ||
| 39 | int (*resume)(struct sh_dev *); | ||
| 40 | }; | ||
| 41 | |||
| 42 | #define to_sh_driver(d) container_of((d), struct sh_driver, drv) | ||
| 43 | #define sh_name(d) ((d)->dev.driver->name) | ||
| 44 | |||
| 45 | /* | ||
| 46 | * Device ID numbers for bus types | ||
| 47 | */ | ||
| 48 | enum { | ||
| 49 | SH_DEV_ID_USB_OHCI, | ||
| 50 | }; | ||
| 51 | |||
| 52 | #define SH_NR_BUSES 1 | ||
| 53 | #define SH_BUS_NAME_VIRT "shbus" | ||
| 54 | |||
| 55 | enum { | ||
| 56 | SH_BUS_VIRT, | ||
| 57 | }; | ||
| 58 | |||
| 59 | /* arch/sh/kernel/cpu/bus.c */ | ||
| 60 | extern int sh_device_register(struct sh_dev *dev); | ||
| 61 | extern void sh_device_unregister(struct sh_dev *dev); | ||
| 62 | extern int sh_driver_register(struct sh_driver *drv); | ||
| 63 | extern void sh_driver_unregister(struct sh_driver *drv); | ||
| 64 | |||
| 65 | #endif /* __ASM_SH_BUS_SH_H */ | ||
| 66 | |||
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 @@ | |||
| 24 | #define MMU_NTLB_WAYS 4 | 24 | #define MMU_NTLB_WAYS 4 |
| 25 | #define MMU_CONTROL_INIT 0x007 /* SV=0, TF=1, IX=1, AT=1 */ | 25 | #define MMU_CONTROL_INIT 0x007 /* SV=0, TF=1, IX=1, AT=1 */ |
| 26 | 26 | ||
| 27 | #define TRA 0xffffffd0 | ||
| 28 | #define EXPEVT 0xffffffd4 | ||
| 29 | |||
| 30 | #if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) || \ | ||
| 31 | defined(CONFIG_CPU_SUBTYPE_SH7300) || defined(CONFIG_CPU_SUBTYPE_SH7705) | ||
| 32 | #define INTEVT 0xa4000000 /* INTEVTE2(0xa4000000) */ | ||
| 33 | #else | ||
| 34 | #define INTEVT 0xffffffd8 | ||
| 35 | #endif | ||
| 36 | |||
| 27 | #endif /* __ASM_CPU_SH3_MMU_CONTEXT_H */ | 37 | #endif /* __ASM_CPU_SH3_MMU_CONTEXT_H */ |
| 28 | 38 | ||
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 @@ | |||
| 23 | #define MMU_PAGE_ASSOC_BIT 0x80 | 23 | #define MMU_PAGE_ASSOC_BIT 0x80 |
| 24 | 24 | ||
| 25 | #define MMU_NTLB_ENTRIES 64 /* for 7750 */ | 25 | #define MMU_NTLB_ENTRIES 64 /* for 7750 */ |
| 26 | #ifdef CONFIG_SH_STORE_QUEUES | ||
| 27 | #define MMU_CONTROL_INIT 0x05 /* SQMD=0, SV=0, TI=1, AT=1 */ | ||
| 28 | #else | ||
| 26 | #define MMU_CONTROL_INIT 0x205 /* SQMD=1, SV=0, TI=1, AT=1 */ | 29 | #define MMU_CONTROL_INIT 0x205 /* SQMD=1, SV=0, TI=1, AT=1 */ |
| 30 | #endif | ||
| 27 | 31 | ||
| 28 | #define MMU_ITLB_DATA_ARRAY 0xF3000000 | 32 | #define MMU_ITLB_DATA_ARRAY 0xF3000000 |
| 29 | #define MMU_UTLB_DATA_ARRAY 0xF7000000 | 33 | #define MMU_UTLB_DATA_ARRAY 0xF7000000 |
| @@ -35,5 +39,9 @@ | |||
| 35 | #define MMU_I_ENTRY_SHIFT 8 | 39 | #define MMU_I_ENTRY_SHIFT 8 |
| 36 | #define MMU_ITLB_VALID 0x100 | 40 | #define MMU_ITLB_VALID 0x100 |
| 37 | 41 | ||
| 42 | #define TRA 0xff000020 | ||
| 43 | #define EXPEVT 0xff000024 | ||
| 44 | #define INTEVT 0xff000028 | ||
| 45 | |||
| 38 | #endif /* __ASM_CPU_SH4_MMU_CONTEXT_H */ | 46 | #endif /* __ASM_CPU_SH4_MMU_CONTEXT_H */ |
| 39 | 47 | ||
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 @@ | |||
| 94 | #define TIOCSERSETMULTI _IOW('T', 91, struct serial_multiport_struct) /* 0x545B */ /* Set multiport config */ | 94 | #define TIOCSERSETMULTI _IOW('T', 91, struct serial_multiport_struct) /* 0x545B */ /* Set multiport config */ |
| 95 | 95 | ||
| 96 | #define TIOCMIWAIT _IO('T', 92) /* 0x545C */ /* wait for a change on serial input line(s) */ | 96 | #define TIOCMIWAIT _IO('T', 92) /* 0x545C */ /* wait for a change on serial input line(s) */ |
| 97 | #define TIOCGICOUNT _IOR('T', 93, struct async_icount) /* 0x545D */ /* read serial port inline interrupt counts */ | 97 | #define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ |
| 98 | 98 | ||
| 99 | #endif /* __ASM_SH_IOCTLS_H */ | 99 | #endif /* __ASM_SH_IOCTLS_H */ |
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 @@ | |||
| 25 | #undef DMA_IPR_POS | 25 | #undef DMA_IPR_POS |
| 26 | #undef DMA_PRIORITY | 26 | #undef DMA_PRIORITY |
| 27 | 27 | ||
| 28 | #undef NR_IRQS | ||
| 29 | |||
| 30 | #undef __irq_demux | ||
| 31 | #undef irq_demux | ||
| 32 | |||
| 33 | #undef INTC_IMCR0 | 28 | #undef INTC_IMCR0 |
| 34 | #undef INTC_IMCR1 | 29 | #undef INTC_IMCR1 |
| 35 | #undef INTC_IMCR2 | 30 | #undef INTC_IMCR2 |
| @@ -229,33 +224,6 @@ | |||
| 229 | #define SIU_IPR_POS 1 | 224 | #define SIU_IPR_POS 1 |
| 230 | #define SIU_PRIORITY 3 | 225 | #define SIU_PRIORITY 3 |
| 231 | 226 | ||
| 232 | |||
| 233 | /* ONCHIP_NR_IRQS */ | ||
| 234 | #define NR_IRQS 109 | ||
| 235 | |||
| 236 | /* In a generic kernel, NR_IRQS is an upper bound, and we should use | ||
| 237 | * ACTUAL_NR_IRQS (which uses the machine vector) to get the correct value. | ||
| 238 | */ | ||
| 239 | #define ACTUAL_NR_IRQS NR_IRQS | ||
| 240 | |||
| 241 | |||
| 242 | extern void disable_irq(unsigned int); | ||
| 243 | extern void disable_irq_nosync(unsigned int); | ||
| 244 | extern void enable_irq(unsigned int); | ||
| 245 | |||
| 246 | /* | ||
| 247 | * Simple Mask Register Support | ||
| 248 | */ | ||
| 249 | extern void make_maskreg_irq(unsigned int irq); | ||
| 250 | extern unsigned short *irq_mask_register; | ||
| 251 | |||
| 252 | /* | ||
| 253 | * Function for "on chip support modules". | ||
| 254 | */ | ||
| 255 | extern void make_ipr_irq(unsigned int irq, unsigned int addr, | ||
| 256 | int pos, int priority); | ||
| 257 | extern void make_imask_irq(unsigned int irq); | ||
| 258 | |||
| 259 | #define PORT_PACR 0xA4050100UL | 227 | #define PORT_PACR 0xA4050100UL |
| 260 | #define PORT_PBCR 0xA4050102UL | 228 | #define PORT_PBCR 0xA4050102UL |
| 261 | #define PORT_PCCR 0xA4050104UL | 229 | #define PORT_PCCR 0xA4050104UL |
| @@ -343,8 +311,6 @@ extern void make_imask_irq(unsigned int irq); | |||
| 343 | #define IRQ6_PRIORITY 1 | 311 | #define IRQ6_PRIORITY 1 |
| 344 | #define IRQ7_PRIORITY 1 | 312 | #define IRQ7_PRIORITY 1 |
| 345 | 313 | ||
| 346 | extern int shmse_irq_demux(int irq); | 314 | int shmse_irq_demux(int irq); |
| 347 | #define __irq_demux(irq) shmse_irq_demux(irq) | ||
| 348 | #define irq_demux(irq) __irq_demux(irq) | ||
| 349 | 315 | ||
| 350 | #endif /* __ASM_SH_IRQ_SH73180_H */ | 316 | #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 @@ | |||
| 299 | #define GPIO_IPR_POS 2 | 299 | #define GPIO_IPR_POS 2 |
| 300 | #define GPIO_PRIORITY 3 | 300 | #define GPIO_PRIORITY 3 |
| 301 | 301 | ||
| 302 | /* ONCHIP_NR_IRQS */ | ||
| 303 | #define NR_IRQS 150 /* 111 + 16 */ | ||
| 304 | |||
| 305 | /* In a generic kernel, NR_IRQS is an upper bound, and we should use | ||
| 306 | * ACTUAL_NR_IRQS (which uses the machine vector) to get the correct value. | ||
| 307 | */ | ||
| 308 | #define ACTUAL_NR_IRQS NR_IRQS | ||
| 309 | |||
| 310 | extern void disable_irq(unsigned int); | ||
| 311 | extern void disable_irq_nosync(unsigned int); | ||
| 312 | extern void enable_irq(unsigned int); | ||
| 313 | |||
| 314 | /* | ||
| 315 | * Simple Mask Register Support | ||
| 316 | */ | ||
| 317 | extern void make_maskreg_irq(unsigned int irq); | ||
| 318 | extern unsigned short *irq_mask_register; | ||
| 319 | |||
| 320 | /* | ||
| 321 | * Function for "on chip support modules". | ||
| 322 | */ | ||
| 323 | extern void make_imask_irq(unsigned int irq); | ||
| 324 | |||
| 325 | #define INTC_TMU0_MSK 0 | 302 | #define INTC_TMU0_MSK 0 |
| 326 | #define INTC_TMU3_MSK 1 | 303 | #define INTC_TMU3_MSK 1 |
| 327 | #define INTC_RTC_MSK 2 | 304 | #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 @@ | |||
| 245 | #endif /* ST40STB1 */ | 245 | #endif /* ST40STB1 */ |
| 246 | 246 | ||
| 247 | #endif /* 775x / SH4-202 / ST40STB1 */ | 247 | #endif /* 775x / SH4-202 / ST40STB1 */ |
| 248 | #endif /* 7780 */ | ||
| 248 | 249 | ||
| 249 | /* NR_IRQS is made from three components: | 250 | /* NR_IRQS is made from three components: |
| 250 | * 1. ONCHIP_NR_IRQS - number of IRLS + on-chip peripherial modules | 251 | * 1. ONCHIP_NR_IRQS - number of IRLS + on-chip peripherial modules |
| @@ -274,8 +275,11 @@ | |||
| 274 | # define ONCHIP_NR_IRQS 72 | 275 | # define ONCHIP_NR_IRQS 72 |
| 275 | #elif defined(CONFIG_CPU_SUBTYPE_ST40STB1) | 276 | #elif defined(CONFIG_CPU_SUBTYPE_ST40STB1) |
| 276 | # define ONCHIP_NR_IRQS 144 | 277 | # define ONCHIP_NR_IRQS 144 |
| 277 | #elif defined(CONFIG_CPU_SUBTYPE_SH7300) | 278 | #elif defined(CONFIG_CPU_SUBTYPE_SH7300) || \ |
| 279 | defined(CONFIG_CPU_SUBTYPE_SH73180) | ||
| 278 | # define ONCHIP_NR_IRQS 109 | 280 | # define ONCHIP_NR_IRQS 109 |
| 281 | #elif defined(CONFIG_CPU_SUBTYPE_SH7780) | ||
| 282 | # define ONCHIP_NR_IRQS 111 | ||
| 279 | #elif defined(CONFIG_SH_UNKNOWN) /* Most be last */ | 283 | #elif defined(CONFIG_SH_UNKNOWN) /* Most be last */ |
| 280 | # define ONCHIP_NR_IRQS 144 | 284 | # define ONCHIP_NR_IRQS 144 |
| 281 | #endif | 285 | #endif |
| @@ -306,6 +310,8 @@ | |||
| 306 | # define OFFCHIP_NR_IRQS 96 | 310 | # define OFFCHIP_NR_IRQS 96 |
| 307 | #elif defined (CONFIG_SH_TITAN) | 311 | #elif defined (CONFIG_SH_TITAN) |
| 308 | # define OFFCHIP_NR_IRQS 4 | 312 | # define OFFCHIP_NR_IRQS 4 |
| 313 | #elif defined(CONFIG_SH_R7780RP) | ||
| 314 | # define OFFCHIP_NR_IRQS 16 | ||
| 309 | #elif defined(CONFIG_SH_UNKNOWN) | 315 | #elif defined(CONFIG_SH_UNKNOWN) |
| 310 | # define OFFCHIP_NR_IRQS 16 /* Must also be last */ | 316 | # define OFFCHIP_NR_IRQS 16 /* Must also be last */ |
| 311 | #else | 317 | #else |
| @@ -550,7 +556,7 @@ extern int ipr_irq_demux(int irq); | |||
| 550 | #define INTC_ICR_IRLM (1<<7) | 556 | #define INTC_ICR_IRLM (1<<7) |
| 551 | #endif | 557 | #endif |
| 552 | 558 | ||
| 553 | #else | 559 | #ifdef CONFIG_CPU_SUBTYPE_SH7780 |
| 554 | #include <asm/irq-sh7780.h> | 560 | #include <asm/irq-sh7780.h> |
| 555 | #endif | 561 | #endif |
| 556 | 562 | ||
diff --git a/include/asm-sh/microdev/irq.h b/include/asm-sh/microdev.h index 47f6f77a65f0..018332a9e590 100644 --- a/include/asm-sh/microdev/irq.h +++ b/include/asm-sh/microdev.h | |||
| @@ -1,32 +1,27 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * linux/include/asm-sh/irq_microdev.h | 2 | * linux/include/asm-sh/microdev.h |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2003 Sean McGoogan (Sean.McGoogan@superh.com) | 4 | * Copyright (C) 2003 Sean McGoogan (Sean.McGoogan@superh.com) |
| 5 | * | 5 | * |
| 6 | * IRQ functions for the SuperH SH4-202 MicroDev board. | 6 | * Definitions for the SuperH SH4-202 MicroDev board. |
| 7 | * | 7 | * |
| 8 | * May be copied or modified under the terms of the GNU General Public | 8 | * May be copied or modified under the terms of the GNU General Public |
| 9 | * License. See linux/COPYING for more information. | 9 | * License. See linux/COPYING for more information. |
| 10 | * | ||
| 11 | */ | 10 | */ |
| 12 | 11 | #ifndef __ASM_SH_MICRODEV_H | |
| 13 | 12 | #define __ASM_SH_MICRODEV_H | |
| 14 | #ifndef _ASM_SH_IRQ_MICRODEV_H | ||
| 15 | #define _ASM_SH_IRQ_MICRODEV_H | ||
| 16 | 13 | ||
| 17 | extern void init_microdev_irq(void); | 14 | extern void init_microdev_irq(void); |
| 18 | extern void microdev_print_fpga_intc_status(void); | 15 | extern void microdev_print_fpga_intc_status(void); |
| 19 | 16 | ||
| 20 | 17 | /* | |
| 21 | /* | 18 | * The following are useful macros for manipulating the interrupt |
| 22 | * The following are useful macros for manipulating the | 19 | * controller (INTC) on the CPU-board FPGA. should be noted that there |
| 23 | * interrupt controller (INTC) on the CPU-board FPGA. | 20 | * is an INTC on the FPGA, and a seperate INTC on the SH4-202 core - |
| 24 | * It should be noted that there is an INTC on the FPGA, | 21 | * these are two different things, both of which need to be prorammed to |
| 25 | * and a seperate INTC on the SH4-202 core - these are | 22 | * correctly route - unfortunately, they have the same name and |
| 26 | * two different things, both of which need to be prorammed | 23 | * abbreviations! |
| 27 | * to correctly route - unfortunately, they have the | 24 | */ |
| 28 | * same name and abbreviations! | ||
| 29 | */ | ||
| 30 | #define MICRODEV_FPGA_INTC_BASE 0xa6110000ul /* INTC base address on CPU-board FPGA */ | 25 | #define MICRODEV_FPGA_INTC_BASE 0xa6110000ul /* INTC base address on CPU-board FPGA */ |
| 31 | #define MICRODEV_FPGA_INTENB_REG (MICRODEV_FPGA_INTC_BASE+0ul) /* Interrupt Enable Register on INTC on CPU-board FPGA */ | 26 | #define MICRODEV_FPGA_INTENB_REG (MICRODEV_FPGA_INTC_BASE+0ul) /* Interrupt Enable Register on INTC on CPU-board FPGA */ |
| 32 | #define MICRODEV_FPGA_INTDSB_REG (MICRODEV_FPGA_INTC_BASE+8ul) /* Interrupt Disable Register on INTC on CPU-board FPGA */ | 27 | #define MICRODEV_FPGA_INTDSB_REG (MICRODEV_FPGA_INTC_BASE+8ul) /* Interrupt Disable Register on INTC on CPU-board FPGA */ |
| @@ -38,10 +33,10 @@ extern void microdev_print_fpga_intc_status(void); | |||
| 38 | #define MICRODEV_FPGA_INTREQ_REG (MICRODEV_FPGA_INTC_BASE+0x38ul) /* Interrupt Request Register on INTC on CPU-board FPGA */ | 33 | #define MICRODEV_FPGA_INTREQ_REG (MICRODEV_FPGA_INTC_BASE+0x38ul) /* Interrupt Request Register on INTC on CPU-board FPGA */ |
| 39 | 34 | ||
| 40 | 35 | ||
| 41 | /* | 36 | /* |
| 42 | * The following are the IRQ numbers for the Linux Kernel for external interrupts. | 37 | * The following are the IRQ numbers for the Linux Kernel for external |
| 43 | * i.e. the numbers seen by 'cat /proc/interrupt'. | 38 | * interrupts. i.e. the numbers seen by 'cat /proc/interrupt'. |
| 44 | */ | 39 | */ |
| 45 | #define MICRODEV_LINUX_IRQ_KEYBOARD 1 /* SuperIO Keyboard */ | 40 | #define MICRODEV_LINUX_IRQ_KEYBOARD 1 /* SuperIO Keyboard */ |
| 46 | #define MICRODEV_LINUX_IRQ_SERIAL1 2 /* SuperIO Serial #1 */ | 41 | #define MICRODEV_LINUX_IRQ_SERIAL1 2 /* SuperIO Serial #1 */ |
| 47 | #define MICRODEV_LINUX_IRQ_ETHERNET 3 /* on-board Ethnernet */ | 42 | #define MICRODEV_LINUX_IRQ_ETHERNET 3 /* on-board Ethnernet */ |
| @@ -51,10 +46,11 @@ extern void microdev_print_fpga_intc_status(void); | |||
| 51 | #define MICRODEV_LINUX_IRQ_IDE2 13 /* SuperIO IDE #2 */ | 46 | #define MICRODEV_LINUX_IRQ_IDE2 13 /* SuperIO IDE #2 */ |
| 52 | #define MICRODEV_LINUX_IRQ_IDE1 14 /* SuperIO IDE #1 */ | 47 | #define MICRODEV_LINUX_IRQ_IDE1 14 /* SuperIO IDE #1 */ |
| 53 | 48 | ||
| 54 | /* | 49 | /* |
| 55 | * The following are the IRQ numbers for the INTC on the FPGA for external interrupts. | 50 | * The following are the IRQ numbers for the INTC on the FPGA for |
| 56 | * i.e. the bits in the INTC registers in the FPGA. | 51 | * external interrupts. i.e. the bits in the INTC registers in the |
| 57 | */ | 52 | * FPGA. |
| 53 | */ | ||
| 58 | #define MICRODEV_FPGA_IRQ_KEYBOARD 1 /* SuperIO Keyboard */ | 54 | #define MICRODEV_FPGA_IRQ_KEYBOARD 1 /* SuperIO Keyboard */ |
| 59 | #define MICRODEV_FPGA_IRQ_SERIAL1 3 /* SuperIO Serial #1 */ | 55 | #define MICRODEV_FPGA_IRQ_SERIAL1 3 /* SuperIO Serial #1 */ |
| 60 | #define MICRODEV_FPGA_IRQ_SERIAL2 4 /* SuperIO Serial #2 */ | 56 | #define MICRODEV_FPGA_IRQ_SERIAL2 4 /* SuperIO Serial #2 */ |
| @@ -69,4 +65,16 @@ extern void microdev_print_fpga_intc_status(void); | |||
| 69 | #define MICRODEV_IRQ_PCI_INTC 10 | 65 | #define MICRODEV_IRQ_PCI_INTC 10 |
| 70 | #define MICRODEV_IRQ_PCI_INTD 11 | 66 | #define MICRODEV_IRQ_PCI_INTD 11 |
| 71 | 67 | ||
| 72 | #endif /* _ASM_SH_IRQ_MICRODEV_H */ | 68 | #define __IO_PREFIX microdev |
| 69 | #include <asm/io_generic.h> | ||
| 70 | |||
| 71 | #if defined(CONFIG_PCI) | ||
| 72 | unsigned char microdev_pci_inb(unsigned long port); | ||
| 73 | unsigned short microdev_pci_inw(unsigned long port); | ||
| 74 | unsigned long microdev_pci_inl(unsigned long port); | ||
| 75 | void microdev_pci_outb(unsigned char data, unsigned long port); | ||
| 76 | void microdev_pci_outw(unsigned short data, unsigned long port); | ||
| 77 | void microdev_pci_outl(unsigned long data, unsigned long port); | ||
| 78 | #endif | ||
| 79 | |||
| 80 | #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 @@ | |||
| 1 | /* | ||
| 2 | * linux/include/asm-sh/io_microdev.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2003 Sean McGoogan (Sean.McGoogan@superh.com) | ||
| 5 | * | ||
| 6 | * IO functions for the SuperH SH4-202 MicroDev board. | ||
| 7 | * | ||
| 8 | * May be copied or modified under the terms of the GNU General Public | ||
| 9 | * License. See linux/COPYING for more information. | ||
| 10 | * | ||
| 11 | */ | ||
| 12 | |||
| 13 | |||
| 14 | #ifndef _ASM_SH_IO_MICRODEV_H | ||
| 15 | #define _ASM_SH_IO_MICRODEV_H | ||
| 16 | |||
| 17 | extern unsigned long microdev_isa_port2addr(unsigned long offset); | ||
| 18 | |||
| 19 | extern unsigned char microdev_inb(unsigned long port); | ||
| 20 | extern unsigned short microdev_inw(unsigned long port); | ||
| 21 | extern unsigned int microdev_inl(unsigned long port); | ||
| 22 | |||
| 23 | extern void microdev_outb(unsigned char value, unsigned long port); | ||
| 24 | extern void microdev_outw(unsigned short value, unsigned long port); | ||
| 25 | extern void microdev_outl(unsigned int value, unsigned long port); | ||
| 26 | |||
| 27 | extern unsigned char microdev_inb_p(unsigned long port); | ||
| 28 | extern unsigned short microdev_inw_p(unsigned long port); | ||
| 29 | extern unsigned int microdev_inl_p(unsigned long port); | ||
| 30 | |||
| 31 | extern void microdev_outb_p(unsigned char value, unsigned long port); | ||
| 32 | extern void microdev_outw_p(unsigned short value, unsigned long port); | ||
| 33 | extern void microdev_outl_p(unsigned int value, unsigned long port); | ||
| 34 | |||
| 35 | extern void microdev_insb(unsigned long port, void *addr, unsigned long count); | ||
| 36 | extern void microdev_insw(unsigned long port, void *addr, unsigned long count); | ||
| 37 | extern void microdev_insl(unsigned long port, void *addr, unsigned long count); | ||
| 38 | |||
| 39 | extern void microdev_outsb(unsigned long port, const void *addr, unsigned long count); | ||
| 40 | extern void microdev_outsw(unsigned long port, const void *addr, unsigned long count); | ||
| 41 | extern void microdev_outsl(unsigned long port, const void *addr, unsigned long count); | ||
| 42 | |||
| 43 | #if defined(CONFIG_PCI) | ||
| 44 | extern unsigned char microdev_pci_inb(unsigned long port); | ||
| 45 | extern unsigned short microdev_pci_inw(unsigned long port); | ||
| 46 | extern unsigned long microdev_pci_inl(unsigned long port); | ||
| 47 | extern void microdev_pci_outb(unsigned char data, unsigned long port); | ||
| 48 | extern void microdev_pci_outw(unsigned short data, unsigned long port); | ||
| 49 | extern void microdev_pci_outl(unsigned long data, unsigned long port); | ||
| 50 | #endif | ||
| 51 | |||
| 52 | #endif /* _ASM_SH_IO_MICRODEV_H */ | ||
| 53 | |||
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 @@ | |||
| 12 | #include <asm/page.h> | 12 | #include <asm/page.h> |
| 13 | #include <asm/types.h> | 13 | #include <asm/types.h> |
| 14 | #include <asm/cache.h> | 14 | #include <asm/cache.h> |
| 15 | #include <linux/threads.h> | ||
| 16 | #include <asm/ptrace.h> | 15 | #include <asm/ptrace.h> |
| 17 | 16 | ||
| 18 | /* | 17 | /* |
| @@ -30,7 +29,7 @@ | |||
| 30 | * CPU type and hardware bug flags. Kept separately for each CPU. | 29 | * CPU type and hardware bug flags. Kept separately for each CPU. |
| 31 | * | 30 | * |
| 32 | * Each one of these also needs a CONFIG_CPU_SUBTYPE_xxx entry | 31 | * Each one of these also needs a CONFIG_CPU_SUBTYPE_xxx entry |
| 33 | * in arch/sh/Kconfig, as well as an entry in arch/sh/kernel/setup.c | 32 | * in arch/sh/mm/Kconfig, as well as an entry in arch/sh/kernel/setup.c |
| 34 | * for parsing the subtype in get_cpu_subtype(). | 33 | * for parsing the subtype in get_cpu_subtype(). |
| 35 | */ | 34 | */ |
| 36 | enum cpu_type { | 35 | enum cpu_type { |
| @@ -44,7 +43,7 @@ enum cpu_type { | |||
| 44 | /* SH-4 types */ | 43 | /* SH-4 types */ |
| 45 | CPU_SH7750, CPU_SH7750S, CPU_SH7750R, CPU_SH7751, CPU_SH7751R, | 44 | CPU_SH7750, CPU_SH7750S, CPU_SH7750R, CPU_SH7751, CPU_SH7751R, |
| 46 | CPU_SH7760, CPU_ST40RA, CPU_ST40GX1, CPU_SH4_202, CPU_SH4_501, | 45 | CPU_SH7760, CPU_ST40RA, CPU_ST40GX1, CPU_SH4_202, CPU_SH4_501, |
| 47 | CPU_SH73180, | 46 | CPU_SH73180, CPU_SH7770, CPU_SH7780, CPU_SH7781, |
| 48 | 47 | ||
| 49 | /* Unknown subtype */ | 48 | /* Unknown subtype */ |
| 50 | CPU_SH_NONE | 49 | CPU_SH_NONE |
| @@ -52,14 +51,8 @@ enum cpu_type { | |||
| 52 | 51 | ||
| 53 | struct sh_cpuinfo { | 52 | struct sh_cpuinfo { |
| 54 | enum cpu_type type; | 53 | enum cpu_type type; |
| 55 | char hard_math; | ||
| 56 | unsigned long loops_per_jiffy; | 54 | unsigned long loops_per_jiffy; |
| 57 | 55 | ||
| 58 | unsigned int cpu_clock, master_clock, bus_clock, module_clock; | ||
| 59 | #ifdef CONFIG_CPU_SUBTYPE_ST40STB1 | ||
| 60 | unsigned int memory_clock; | ||
| 61 | #endif | ||
| 62 | |||
| 63 | struct cache_info icache; | 56 | struct cache_info icache; |
| 64 | struct cache_info dcache; | 57 | struct cache_info dcache; |
| 65 | 58 | ||
| @@ -131,7 +124,7 @@ union sh_fpu_union { | |||
| 131 | struct sh_fpu_soft_struct soft; | 124 | struct sh_fpu_soft_struct soft; |
| 132 | }; | 125 | }; |
| 133 | 126 | ||
| 134 | /* | 127 | /* |
| 135 | * Processor flags | 128 | * Processor flags |
| 136 | */ | 129 | */ |
| 137 | 130 | ||
| @@ -140,6 +133,7 @@ union sh_fpu_union { | |||
| 140 | #define CPU_HAS_MMU_PAGE_ASSOC 0x0004 /* SH3: TLB way selection bit support */ | 133 | #define CPU_HAS_MMU_PAGE_ASSOC 0x0004 /* SH3: TLB way selection bit support */ |
| 141 | #define CPU_HAS_DSP 0x0008 /* SH-DSP: DSP support */ | 134 | #define CPU_HAS_DSP 0x0008 /* SH-DSP: DSP support */ |
| 142 | #define CPU_HAS_PERF_COUNTER 0x0010 /* Hardware performance counters */ | 135 | #define CPU_HAS_PERF_COUNTER 0x0010 /* Hardware performance counters */ |
| 136 | #define CPU_HAS_PTEA 0x0020 /* PTEA register */ | ||
| 143 | 137 | ||
| 144 | struct thread_struct { | 138 | struct thread_struct { |
| 145 | unsigned long sp; | 139 | unsigned long sp; |
| @@ -160,10 +154,10 @@ extern int ubc_usercnt; | |||
| 160 | #define INIT_THREAD { \ | 154 | #define INIT_THREAD { \ |
| 161 | sizeof(init_stack) + (long) &init_stack, /* sp */ \ | 155 | sizeof(init_stack) + (long) &init_stack, /* sp */ \ |
| 162 | 0, /* pc */ \ | 156 | 0, /* pc */ \ |
| 163 | 0, 0, \ | 157 | 0, 0, \ |
| 164 | 0, \ | 158 | 0, \ |
| 165 | 0, \ | 159 | 0, \ |
| 166 | {{{0,}},} /* fpu state */ \ | 160 | {{{0,}},} /* fpu state */ \ |
| 167 | } | 161 | } |
| 168 | 162 | ||
| 169 | /* | 163 | /* |
| @@ -171,7 +165,7 @@ extern int ubc_usercnt; | |||
| 171 | */ | 165 | */ |
| 172 | #define start_thread(regs, new_pc, new_sp) \ | 166 | #define start_thread(regs, new_pc, new_sp) \ |
| 173 | set_fs(USER_DS); \ | 167 | set_fs(USER_DS); \ |
| 174 | regs->pr = 0; \ | 168 | regs->pr = 0; \ |
| 175 | regs->sr = SR_FD; /* User mode. */ \ | 169 | regs->sr = SR_FD; /* User mode. */ \ |
| 176 | regs->pc = new_pc; \ | 170 | regs->pc = new_pc; \ |
| 177 | regs->regs[15] = new_sp | 171 | regs->regs[15] = new_sp |
| @@ -239,16 +233,16 @@ extern void save_fpu(struct task_struct *__tsk, struct pt_regs *regs); | |||
| 239 | #define save_fpu(tsk) do { } while (0) | 233 | #define save_fpu(tsk) do { } while (0) |
| 240 | #endif | 234 | #endif |
| 241 | 235 | ||
| 242 | #define unlazy_fpu(tsk, regs) do { \ | 236 | #define unlazy_fpu(tsk, regs) do { \ |
| 243 | if (test_tsk_thread_flag(tsk, TIF_USEDFPU)) { \ | 237 | if (test_tsk_thread_flag(tsk, TIF_USEDFPU)) { \ |
| 244 | save_fpu(tsk, regs); \ | 238 | save_fpu(tsk, regs); \ |
| 245 | } \ | 239 | } \ |
| 246 | } while (0) | 240 | } while (0) |
| 247 | 241 | ||
| 248 | #define clear_fpu(tsk, regs) do { \ | 242 | #define clear_fpu(tsk, regs) do { \ |
| 249 | if (test_tsk_thread_flag(tsk, TIF_USEDFPU)) { \ | 243 | if (test_tsk_thread_flag(tsk, TIF_USEDFPU)) { \ |
| 250 | clear_tsk_thread_flag(tsk, TIF_USEDFPU); \ | 244 | clear_tsk_thread_flag(tsk, TIF_USEDFPU); \ |
| 251 | release_fpu(regs); \ | 245 | release_fpu(regs); \ |
| 252 | } \ | 246 | } \ |
| 253 | } while (0) | 247 | } while (0) |
| 254 | 248 | ||
