diff options
Diffstat (limited to 'include/asm-sh')
30 files changed, 143 insertions, 404 deletions
diff --git a/include/asm-sh/Kbuild b/include/asm-sh/Kbuild index c68e1680da01..76a8ccf254a5 100644 --- a/include/asm-sh/Kbuild +++ b/include/asm-sh/Kbuild | |||
@@ -1 +1,3 @@ | |||
1 | include include/asm-generic/Kbuild.asm | 1 | include include/asm-generic/Kbuild.asm |
2 | |||
3 | header-y += cpu-features.h | ||
diff --git a/include/asm-sh/apm.h b/include/asm-sh/apm.h deleted file mode 100644 index 8b091e93651f..000000000000 --- a/include/asm-sh/apm.h +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2006 (c) Andriy Skulysh <askulysh@gmail.com> | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | #ifndef __ASM_SH_APM_H | ||
11 | #define __ASM_SH_APM_H | ||
12 | |||
13 | #define APM_AC_OFFLINE 0 | ||
14 | #define APM_AC_ONLINE 1 | ||
15 | #define APM_AC_BACKUP 2 | ||
16 | #define APM_AC_UNKNOWN 0xff | ||
17 | |||
18 | #define APM_BATTERY_STATUS_HIGH 0 | ||
19 | #define APM_BATTERY_STATUS_LOW 1 | ||
20 | #define APM_BATTERY_STATUS_CRITICAL 2 | ||
21 | #define APM_BATTERY_STATUS_CHARGING 3 | ||
22 | #define APM_BATTERY_STATUS_NOT_PRESENT 4 | ||
23 | #define APM_BATTERY_STATUS_UNKNOWN 0xff | ||
24 | |||
25 | #define APM_BATTERY_LIFE_UNKNOWN 0xFFFF | ||
26 | #define APM_BATTERY_LIFE_MINUTES 0x8000 | ||
27 | #define APM_BATTERY_LIFE_VALUE_MASK 0x7FFF | ||
28 | |||
29 | #define APM_BATTERY_FLAG_HIGH (1 << 0) | ||
30 | #define APM_BATTERY_FLAG_LOW (1 << 1) | ||
31 | #define APM_BATTERY_FLAG_CRITICAL (1 << 2) | ||
32 | #define APM_BATTERY_FLAG_CHARGING (1 << 3) | ||
33 | #define APM_BATTERY_FLAG_NOT_PRESENT (1 << 7) | ||
34 | #define APM_BATTERY_FLAG_UNKNOWN 0xff | ||
35 | |||
36 | #define APM_UNITS_MINS 0 | ||
37 | #define APM_UNITS_SECS 1 | ||
38 | #define APM_UNITS_UNKNOWN -1 | ||
39 | |||
40 | |||
41 | extern int (*apm_get_info)(char *buf, char **start, off_t fpos, int length); | ||
42 | extern int apm_suspended; | ||
43 | |||
44 | void apm_queue_event(apm_event_t event); | ||
45 | |||
46 | #endif | ||
diff --git a/include/asm-sh/bigsur/bigsur.h b/include/asm-sh/bigsur/bigsur.h deleted file mode 100644 index 427245f93589..000000000000 --- a/include/asm-sh/bigsur/bigsur.h +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * Hitachi Big Sur Eval Board support | ||
4 | * | ||
5 | * Dustin McIntire (dustin@sensoria.com) | ||
6 | * | ||
7 | * May be copied or modified under the terms of the GNU General Public | ||
8 | * License. See linux/COPYING for more information. | ||
9 | * | ||
10 | * Derived from Hitachi SH7751 reference manual | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | #ifndef _ASM_BIGSUR_H_ | ||
15 | #define _ASM_BIGSUR_H_ | ||
16 | |||
17 | #include <asm/irq.h> | ||
18 | #include <asm/hd64465/hd64465.h> | ||
19 | |||
20 | /* 7751 Internal IRQ's used by external CPLD controller */ | ||
21 | #define BIGSUR_IRQ_LOW 0 | ||
22 | #define BIGSUR_IRQ_NUM 14 /* External CPLD level 1 IRQs */ | ||
23 | #define BIGSUR_IRQ_HIGH (BIGSUR_IRQ_LOW + BIGSUR_IRQ_NUM) | ||
24 | #define BIGSUR_2NDLVL_IRQ_LOW (HD64465_IRQ_BASE+HD64465_IRQ_NUM) | ||
25 | #define BIGSUR_2NDLVL_IRQ_NUM 32 /* Level 2 IRQs = 4 regs * 8 bits */ | ||
26 | #define BIGSUR_2NDLVL_IRQ_HIGH (BIGSUR_2NDLVL_IRQ_LOW + \ | ||
27 | BIGSUR_2NDLVL_IRQ_NUM) | ||
28 | |||
29 | /* PCI interrupt base number (A_INTA-A_INTD) */ | ||
30 | #define BIGSUR_SH7751_PCI_IRQ_BASE (BIGSUR_2NDLVL_IRQ_LOW+10) | ||
31 | |||
32 | /* CPLD registers and external chip addresses */ | ||
33 | #define BIGSUR_HD64464_ADDR 0xB2000000 | ||
34 | #define BIGSUR_DGDR 0xB1FFFE00 | ||
35 | #define BIGSUR_BIDR 0xB1FFFD00 | ||
36 | #define BIGSUR_CSLR 0xB1FFFC00 | ||
37 | #define BIGSUR_SW1R 0xB1FFFB00 | ||
38 | #define BIGSUR_DBGR 0xB1FFFA00 | ||
39 | #define BIGSUR_BDTR 0xB1FFF900 | ||
40 | #define BIGSUR_BDRR 0xB1FFF800 | ||
41 | #define BIGSUR_PPR1 0xB1FFF700 | ||
42 | #define BIGSUR_PPR2 0xB1FFF600 | ||
43 | #define BIGSUR_IDE2 0xB1FFF500 | ||
44 | #define BIGSUR_IDE3 0xB1FFF400 | ||
45 | #define BIGSUR_SPCR 0xB1FFF300 | ||
46 | #define BIGSUR_ETHR 0xB1FE0000 | ||
47 | #define BIGSUR_PPDR 0xB1FDFF00 | ||
48 | #define BIGSUR_ICTL 0xB1FDFE00 | ||
49 | #define BIGSUR_ICMD 0xB1FDFD00 | ||
50 | #define BIGSUR_DMA0 0xB1FDFC00 | ||
51 | #define BIGSUR_DMA1 0xB1FDFB00 | ||
52 | #define BIGSUR_IRQ0 0xB1FDFA00 | ||
53 | #define BIGSUR_IRQ1 0xB1FDF900 | ||
54 | #define BIGSUR_IRQ2 0xB1FDF800 | ||
55 | #define BIGSUR_IRQ3 0xB1FDF700 | ||
56 | #define BIGSUR_IMR0 0xB1FDF600 | ||
57 | #define BIGSUR_IMR1 0xB1FDF500 | ||
58 | #define BIGSUR_IMR2 0xB1FDF400 | ||
59 | #define BIGSUR_IMR3 0xB1FDF300 | ||
60 | #define BIGSUR_IRLMR0 0xB1FDF200 | ||
61 | #define BIGSUR_IRLMR1 0xB1FDF100 | ||
62 | #define BIGSUR_V320USC_ADDR 0xB1000000 | ||
63 | #define BIGSUR_HD64465_ADDR 0xB0000000 | ||
64 | #define BIGSUR_INTERNAL_BASE 0xB0000000 | ||
65 | |||
66 | /* SMC ethernet card parameters */ | ||
67 | #define BIGSUR_ETHER_IOPORT 0x220 | ||
68 | |||
69 | /* IDE register paramters */ | ||
70 | #define BIGSUR_IDECMD_IOPORT 0x1f0 | ||
71 | #define BIGSUR_IDECTL_IOPORT 0x1f8 | ||
72 | |||
73 | /* LED bit position in BIGSUR_CSLR */ | ||
74 | #define BIGSUR_LED (1<<4) | ||
75 | |||
76 | /* PCI: default LOCAL memory window sizes (seen from PCI bus) */ | ||
77 | #define BIGSUR_LSR0_SIZE (64*(1<<20)) //64MB | ||
78 | #define BIGSUR_LSR1_SIZE (64*(1<<20)) //64MB | ||
79 | |||
80 | #endif /* _ASM_BIGSUR_H_ */ | ||
diff --git a/include/asm-sh/bigsur/io.h b/include/asm-sh/bigsur/io.h deleted file mode 100644 index 1470ac8d4a39..000000000000 --- a/include/asm-sh/bigsur/io.h +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-sh/bigsur/io.h | ||
3 | * | ||
4 | * By Dustin McIntire (dustin@sensoria.com) (c)2001 | ||
5 | * Derived from io_hd64465.h, which bore the message: | ||
6 | * By Greg Banks <gbanks@pocketpenguins.com> | ||
7 | * (c) 2000 PocketPenguins Inc. | ||
8 | * and from io_hd64461.h, which bore the message: | ||
9 | * Copyright 2000 Stuart Menefy (stuart.menefy@st.com) | ||
10 | * | ||
11 | * May be copied or modified under the terms of the GNU General Public | ||
12 | * License. See linux/COPYING for more information. | ||
13 | * | ||
14 | * IO functions for a Hitachi Big Sur Evaluation Board. | ||
15 | */ | ||
16 | |||
17 | #ifndef _ASM_SH_IO_BIGSUR_H | ||
18 | #define _ASM_SH_IO_BIGSUR_H | ||
19 | |||
20 | #include <linux/types.h> | ||
21 | |||
22 | extern unsigned long bigsur_isa_port2addr(unsigned long offset); | ||
23 | extern int bigsur_irq_demux(int irq); | ||
24 | /* Provision for generic secondary demux step -- used by PCMCIA code */ | ||
25 | extern void bigsur_register_irq_demux(int irq, | ||
26 | int (*demux)(int irq, void *dev), void *dev); | ||
27 | extern void bigsur_unregister_irq_demux(int irq); | ||
28 | /* Set this variable to 1 to see port traffic */ | ||
29 | extern int bigsur_io_debug; | ||
30 | /* Map a range of ports to a range of kernel virtual memory. */ | ||
31 | extern void bigsur_port_map(u32 baseport, u32 nports, u32 addr, u8 shift); | ||
32 | extern void bigsur_port_unmap(u32 baseport, u32 nports); | ||
33 | |||
34 | #endif /* _ASM_SH_IO_BIGSUR_H */ | ||
35 | |||
diff --git a/include/asm-sh/bigsur/serial.h b/include/asm-sh/bigsur/serial.h deleted file mode 100644 index a08fa82fe45a..000000000000 --- a/include/asm-sh/bigsur/serial.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-sh/bigsur/serial.h | ||
3 | * | ||
4 | * Configuration details for Big Sur 16550 based serial ports | ||
5 | * i.e. HD64465, PCMCIA, etc. | ||
6 | */ | ||
7 | |||
8 | #ifndef _ASM_SERIAL_BIGSUR_H | ||
9 | #define _ASM_SERIAL_BIGSUR_H | ||
10 | #include <asm/hd64465.h> | ||
11 | |||
12 | #define BASE_BAUD (3379200 / 16) | ||
13 | |||
14 | #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) | ||
15 | |||
16 | |||
17 | #define SERIAL_PORT_DFNS \ | ||
18 | /* UART CLK PORT IRQ FLAGS */ \ | ||
19 | { 0, BASE_BAUD, 0x3F8, HD64465_IRQ_UART, STD_COM_FLAGS } /* ttyS0 */ | ||
20 | |||
21 | /* XXX: This should be moved ino irq.h */ | ||
22 | #define irq_cannonicalize(x) (x) | ||
23 | |||
24 | #endif /* _ASM_SERIAL_BIGSUR_H */ | ||
diff --git a/include/asm-sh/bugs.h b/include/asm-sh/bugs.h index a294997a8412..5a117ec43c77 100644 --- a/include/asm-sh/bugs.h +++ b/include/asm-sh/bugs.h | |||
@@ -19,9 +19,9 @@ static void __init check_bugs(void) | |||
19 | extern unsigned long loops_per_jiffy; | 19 | extern unsigned long loops_per_jiffy; |
20 | char *p = &init_utsname()->machine[2]; /* "sh" */ | 20 | char *p = &init_utsname()->machine[2]; /* "sh" */ |
21 | 21 | ||
22 | cpu_data->loops_per_jiffy = loops_per_jiffy; | 22 | current_cpu_data.loops_per_jiffy = loops_per_jiffy; |
23 | 23 | ||
24 | switch (cpu_data->type) { | 24 | switch (current_cpu_data.type) { |
25 | case CPU_SH7604 ... CPU_SH7619: | 25 | case CPU_SH7604 ... CPU_SH7619: |
26 | *p++ = '2'; | 26 | *p++ = '2'; |
27 | break; | 27 | break; |
@@ -54,7 +54,7 @@ static void __init check_bugs(void) | |||
54 | break; | 54 | break; |
55 | } | 55 | } |
56 | 56 | ||
57 | printk("CPU: %s\n", get_cpu_subtype()); | 57 | printk("CPU: %s\n", get_cpu_subtype(¤t_cpu_data)); |
58 | 58 | ||
59 | #ifndef __LITTLE_ENDIAN__ | 59 | #ifndef __LITTLE_ENDIAN__ |
60 | /* 'eb' means 'Endian Big' */ | 60 | /* 'eb' means 'Endian Big' */ |
diff --git a/include/asm-sh/cacheflush.h b/include/asm-sh/cacheflush.h index 07f62ec9ff0c..22f12634975b 100644 --- a/include/asm-sh/cacheflush.h +++ b/include/asm-sh/cacheflush.h | |||
@@ -30,5 +30,8 @@ extern void __flush_invalidate_region(void *start, int size); | |||
30 | 30 | ||
31 | #define HAVE_ARCH_UNMAPPED_AREA | 31 | #define HAVE_ARCH_UNMAPPED_AREA |
32 | 32 | ||
33 | /* Page flag for lazy dcache write-back for the aliasing UP caches */ | ||
34 | #define PG_dcache_dirty PG_arch_1 | ||
35 | |||
33 | #endif /* __KERNEL__ */ | 36 | #endif /* __KERNEL__ */ |
34 | #endif /* __ASM_SH_CACHEFLUSH_H */ | 37 | #endif /* __ASM_SH_CACHEFLUSH_H */ |
diff --git a/include/asm-sh/cpu-sh3/cacheflush.h b/include/asm-sh/cpu-sh3/cacheflush.h index f70d8ef76a15..6fabbba228de 100644 --- a/include/asm-sh/cpu-sh3/cacheflush.h +++ b/include/asm-sh/cpu-sh3/cacheflush.h | |||
@@ -36,8 +36,6 @@ | |||
36 | /* 32KB cache, 4kb PAGE sizes need to check bit 12 */ | 36 | /* 32KB cache, 4kb PAGE sizes need to check bit 12 */ |
37 | #define CACHE_ALIAS 0x00001000 | 37 | #define CACHE_ALIAS 0x00001000 |
38 | 38 | ||
39 | #define PG_mapped PG_arch_1 | ||
40 | |||
41 | void flush_cache_all(void); | 39 | void flush_cache_all(void); |
42 | void flush_cache_mm(struct mm_struct *mm); | 40 | void flush_cache_mm(struct mm_struct *mm); |
43 | #define flush_cache_dup_mm(mm) flush_cache_mm(mm) | 41 | #define flush_cache_dup_mm(mm) flush_cache_mm(mm) |
diff --git a/include/asm-sh/cpu-sh4/cacheflush.h b/include/asm-sh/cpu-sh4/cacheflush.h index b01a10f31225..b3746a936a09 100644 --- a/include/asm-sh/cpu-sh4/cacheflush.h +++ b/include/asm-sh/cpu-sh4/cacheflush.h | |||
@@ -17,6 +17,7 @@ | |||
17 | * so we need them. | 17 | * so we need them. |
18 | */ | 18 | */ |
19 | void flush_cache_all(void); | 19 | void flush_cache_all(void); |
20 | void flush_dcache_all(void); | ||
20 | void flush_cache_mm(struct mm_struct *mm); | 21 | void flush_cache_mm(struct mm_struct *mm); |
21 | #define flush_cache_dup_mm(mm) flush_cache_mm(mm) | 22 | #define flush_cache_dup_mm(mm) flush_cache_mm(mm) |
22 | void flush_cache_range(struct vm_area_struct *vma, unsigned long start, | 23 | void flush_cache_range(struct vm_area_struct *vma, unsigned long start, |
@@ -38,16 +39,4 @@ void flush_icache_user_range(struct vm_area_struct *vma, struct page *page, | |||
38 | /* Initialization of P3 area for copy_user_page */ | 39 | /* Initialization of P3 area for copy_user_page */ |
39 | void p3_cache_init(void); | 40 | void p3_cache_init(void); |
40 | 41 | ||
41 | #define PG_mapped PG_arch_1 | ||
42 | |||
43 | #ifdef CONFIG_MMU | ||
44 | extern int remap_area_pages(unsigned long addr, unsigned long phys_addr, | ||
45 | unsigned long size, unsigned long flags); | ||
46 | #else /* CONFIG_MMU */ | ||
47 | static inline int remap_area_pages(unsigned long addr, unsigned long phys_addr, | ||
48 | unsigned long size, unsigned long flags) | ||
49 | { | ||
50 | return 0; | ||
51 | } | ||
52 | #endif /* CONFIG_MMU */ | ||
53 | #endif /* __ASM_CPU_SH4_CACHEFLUSH_H */ | 42 | #endif /* __ASM_CPU_SH4_CACHEFLUSH_H */ |
diff --git a/include/asm-sh/cpu-sh4/dma.h b/include/asm-sh/cpu-sh4/dma.h index 3e4b3e6d80c0..c135e9cebd9c 100644 --- a/include/asm-sh/cpu-sh4/dma.h +++ b/include/asm-sh/cpu-sh4/dma.h | |||
@@ -3,6 +3,17 @@ | |||
3 | 3 | ||
4 | #define DMAOR_INIT ( 0x8000 | DMAOR_DME ) | 4 | #define DMAOR_INIT ( 0x8000 | DMAOR_DME ) |
5 | 5 | ||
6 | /* SH7751/7760/7780 DMA IRQ sources */ | ||
7 | #define DMTE0_IRQ 34 | ||
8 | #define DMTE1_IRQ 35 | ||
9 | #define DMTE2_IRQ 36 | ||
10 | #define DMTE3_IRQ 37 | ||
11 | #define DMTE4_IRQ 44 | ||
12 | #define DMTE5_IRQ 45 | ||
13 | #define DMTE6_IRQ 46 | ||
14 | #define DMTE7_IRQ 47 | ||
15 | #define DMAE_IRQ 38 | ||
16 | |||
6 | #ifdef CONFIG_CPU_SH4A | 17 | #ifdef CONFIG_CPU_SH4A |
7 | #define SH_DMAC_BASE 0xfc808020 | 18 | #define SH_DMAC_BASE 0xfc808020 |
8 | 19 | ||
diff --git a/include/asm-sh/dma-mapping.h b/include/asm-sh/dma-mapping.h index 8d0867b98e05..d3bc7818bbbe 100644 --- a/include/asm-sh/dma-mapping.h +++ b/include/asm-sh/dma-mapping.h | |||
@@ -53,6 +53,10 @@ static inline void dma_free_coherent(struct device *dev, size_t size, | |||
53 | consistent_free(vaddr, size); | 53 | consistent_free(vaddr, size); |
54 | } | 54 | } |
55 | 55 | ||
56 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) | ||
57 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) | ||
58 | #define dma_is_consistent(d, h) (1) | ||
59 | |||
56 | static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size, | 60 | static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size, |
57 | enum dma_data_direction dir) | 61 | enum dma_data_direction dir) |
58 | { | 62 | { |
diff --git a/include/asm-sh/ec3104/ec3104.h b/include/asm-sh/ec3104/ec3104.h deleted file mode 100644 index 639cfa489c8f..000000000000 --- a/include/asm-sh/ec3104/ec3104.h +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | #ifndef __ASM_EC3104_H | ||
2 | #define __ASM_EC3104_H | ||
3 | |||
4 | |||
5 | /* | ||
6 | * Most of the register set is at 0xb0ec0000 - 0xb0ecffff. | ||
7 | * | ||
8 | * as far as I've figured it out the register map is: | ||
9 | * 0xb0ec0000 - id string | ||
10 | * 0xb0ec0XXX - power management | ||
11 | * 0xb0ec1XXX - interrupt control | ||
12 | * 0xb0ec3XXX - ps2 port (touch pad on aero 8000) | ||
13 | * 0xb0ec6XXX - i2c | ||
14 | * 0xb0ec7000 - first serial port (proprietary connector on aero 8000) | ||
15 | * 0xb0ec8000 - second serial port | ||
16 | * 0xb0ec9000 - third serial port | ||
17 | * 0xb0eca000 - fourth serial port (keyboard controller on aero 8000) | ||
18 | * 0xb0eccXXX - GPIO | ||
19 | * 0xb0ecdXXX - GPIO | ||
20 | */ | ||
21 | |||
22 | #define EC3104_BASE 0xb0ec0000 | ||
23 | |||
24 | #define EC3104_SER4_DATA (EC3104_BASE+0xa000) | ||
25 | #define EC3104_SER4_IIR (EC3104_BASE+0xa008) | ||
26 | #define EC3104_SER4_MCR (EC3104_BASE+0xa010) | ||
27 | #define EC3104_SER4_LSR (EC3104_BASE+0xa014) | ||
28 | #define EC3104_SER4_MSR (EC3104_BASE+0xa018) | ||
29 | |||
30 | /* | ||
31 | * our ISA bus. this seems to be real ISA. | ||
32 | */ | ||
33 | #define EC3104_ISA_BASE 0xa5000000 | ||
34 | |||
35 | #define EC3104_IRQ 11 | ||
36 | #define EC3104_IRQBASE 64 | ||
37 | |||
38 | #define EC3104_IRQ_SER1 EC3104_IRQBASE + 7 | ||
39 | #define EC3104_IRQ_SER2 EC3104_IRQBASE + 8 | ||
40 | #define EC3104_IRQ_SER3 EC3104_IRQBASE + 9 | ||
41 | #define EC3104_IRQ_SER4 EC3104_IRQBASE + 10 | ||
42 | |||
43 | #endif /* __ASM_EC3104_H */ | ||
diff --git a/include/asm-sh/ec3104/io.h b/include/asm-sh/ec3104/io.h deleted file mode 100644 index ea5c8e65ac11..000000000000 --- a/include/asm-sh/ec3104/io.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | #ifndef _ASM_SH_IO_EC3104_H | ||
2 | #define _ASM_SH_IO_EC3104_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | extern unsigned char ec3104_inb(unsigned long port); | ||
7 | extern unsigned short ec3104_inw(unsigned long port); | ||
8 | extern unsigned long ec3104_inl(unsigned long port); | ||
9 | |||
10 | extern void ec3104_outb(unsigned char value, unsigned long port); | ||
11 | extern void ec3104_outw(unsigned short value, unsigned long port); | ||
12 | extern void ec3104_outl(unsigned long value, unsigned long port); | ||
13 | |||
14 | extern int ec3104_irq_demux(int irq); | ||
15 | |||
16 | #endif /* _ASM_SH_IO_EC3104_H */ | ||
diff --git a/include/asm-sh/ec3104/keyboard.h b/include/asm-sh/ec3104/keyboard.h deleted file mode 100644 index c1253a683197..000000000000 --- a/include/asm-sh/ec3104/keyboard.h +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | extern unsigned char ec3104_kbd_sysrq_xlate[]; | ||
2 | extern int ec3104_kbd_setkeycode(unsigned int scancode, unsigned int keycode); | ||
3 | extern int ec3104_kbd_getkeycode(unsigned int scancode); | ||
4 | extern int ec3104_kbd_translate(unsigned char, unsigned char *, char); | ||
5 | extern char ec3104_kbd_unexpected_up(unsigned char); | ||
6 | extern void ec3104_kbd_leds(unsigned char); | ||
7 | extern void ec3104_kbd_init_hw(void); | ||
8 | |||
9 | #define kbd_sysrq_xlate ec3104_kbd_sysrq_xlate | ||
10 | #define kbd_setkeycode ec3104_kbd_setkeycode | ||
11 | #define kbd_getkeycode ec3104_kbd_getkeycode | ||
12 | #define kbd_translate ec3104_kbd_translate | ||
13 | #define kbd_unexpected_up ec3104_kbd_unexpected_up | ||
14 | #define kbd_leds ec3104_kbd_leds | ||
15 | #define kbd_init_hw ec3104_kbd_init_hw | ||
diff --git a/include/asm-sh/ec3104/serial.h b/include/asm-sh/ec3104/serial.h deleted file mode 100644 index cfe4d78ec1ee..000000000000 --- a/include/asm-sh/ec3104/serial.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | #include <asm/ec3104.h> | ||
2 | /* Naturally we don't know the exact value but 115200 baud has a divisor | ||
3 | * of 9 and 19200 baud has a divisor of 52, so this seems like a good | ||
4 | * guess. */ | ||
5 | #define BASE_BAUD (16800000 / 16) | ||
6 | |||
7 | #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) | ||
8 | |||
9 | /* there is a fourth serial port with the expected values as well, but | ||
10 | * it's got the keyboard controller behind it so we can't really use it | ||
11 | * (without moving the keyboard driver to userspace, which doesn't sound | ||
12 | * like a very good idea) */ | ||
13 | #define SERIAL_PORT_DFNS \ | ||
14 | /* UART CLK PORT IRQ FLAGS */ \ | ||
15 | { 0, BASE_BAUD, 0x11C00, EC3104_IRQBASE+7, STD_COM_FLAGS }, /* ttyS0 */ \ | ||
16 | { 0, BASE_BAUD, 0x12000, EC3104_IRQBASE+8, STD_COM_FLAGS }, /* ttyS1 */ \ | ||
17 | { 0, BASE_BAUD, 0x12400, EC3104_IRQBASE+9, STD_COM_FLAGS }, /* ttyS2 */ | ||
18 | |||
19 | /* XXX: This should be moved ino irq.h */ | ||
20 | #define irq_cannonicalize(x) (x) | ||
diff --git a/include/asm-sh/irq.h b/include/asm-sh/irq.h index bff965ef4b95..8ccf7ae593ef 100644 --- a/include/asm-sh/irq.h +++ b/include/asm-sh/irq.h | |||
@@ -66,12 +66,8 @@ | |||
66 | /* 3. OFFCHIP_NR_IRQS */ | 66 | /* 3. OFFCHIP_NR_IRQS */ |
67 | #if defined(CONFIG_HD64461) | 67 | #if defined(CONFIG_HD64461) |
68 | # define OFFCHIP_NR_IRQS 18 | 68 | # define OFFCHIP_NR_IRQS 18 |
69 | #elif defined (CONFIG_SH_BIGSUR) /* must be before CONFIG_HD64465 */ | ||
70 | # define OFFCHIP_NR_IRQS 48 | ||
71 | #elif defined(CONFIG_HD64465) | 69 | #elif defined(CONFIG_HD64465) |
72 | # define OFFCHIP_NR_IRQS 16 | 70 | # define OFFCHIP_NR_IRQS 16 |
73 | #elif defined (CONFIG_SH_EC3104) | ||
74 | # define OFFCHIP_NR_IRQS 16 | ||
75 | #elif defined (CONFIG_SH_DREAMCAST) | 71 | #elif defined (CONFIG_SH_DREAMCAST) |
76 | # define OFFCHIP_NR_IRQS 96 | 72 | # define OFFCHIP_NR_IRQS 96 |
77 | #elif defined (CONFIG_SH_TITAN) | 73 | #elif defined (CONFIG_SH_TITAN) |
diff --git a/include/asm-sh/kgdb.h b/include/asm-sh/kgdb.h index 7b26f53fe343..0095c665d272 100644 --- a/include/asm-sh/kgdb.h +++ b/include/asm-sh/kgdb.h | |||
@@ -85,10 +85,10 @@ extern int setjmp(jmp_buf __jmpb); | |||
85 | #define KGDB_PRINTK(...) printk("KGDB: " __VA_ARGS__) | 85 | #define KGDB_PRINTK(...) printk("KGDB: " __VA_ARGS__) |
86 | 86 | ||
87 | /* Forced breakpoint */ | 87 | /* Forced breakpoint */ |
88 | #define BREAKPOINT() do { \ | 88 | #define BREAKPOINT() \ |
89 | if (kgdb_enabled) { \ | 89 | do { \ |
90 | asm volatile("trapa #0xff"); \ | 90 | if (kgdb_enabled) \ |
91 | } \ | 91 | __asm__ __volatile__("trapa #0x3c"); \ |
92 | } while (0) | 92 | } while (0) |
93 | 93 | ||
94 | /* KGDB should be able to flush all kernel text space */ | 94 | /* KGDB should be able to flush all kernel text space */ |
diff --git a/include/asm-sh/mmu.h b/include/asm-sh/mmu.h index cf47df79bb94..eb0358c097d0 100644 --- a/include/asm-sh/mmu.h +++ b/include/asm-sh/mmu.h | |||
@@ -1,25 +1,19 @@ | |||
1 | #ifndef __MMU_H | 1 | #ifndef __MMU_H |
2 | #define __MMU_H | 2 | #define __MMU_H |
3 | 3 | ||
4 | #if !defined(CONFIG_MMU) | 4 | /* Default "unsigned long" context */ |
5 | typedef unsigned long mm_context_id_t[NR_CPUS]; | ||
5 | 6 | ||
6 | typedef struct { | 7 | typedef struct { |
8 | #ifdef CONFIG_MMU | ||
9 | mm_context_id_t id; | ||
10 | void *vdso; | ||
11 | #else | ||
7 | struct vm_list_struct *vmlist; | 12 | struct vm_list_struct *vmlist; |
8 | unsigned long end_brk; | 13 | unsigned long end_brk; |
14 | #endif | ||
9 | } mm_context_t; | 15 | } mm_context_t; |
10 | 16 | ||
11 | #else | ||
12 | |||
13 | /* Default "unsigned long" context */ | ||
14 | typedef unsigned long mm_context_id_t; | ||
15 | |||
16 | typedef struct { | ||
17 | mm_context_id_t id; | ||
18 | void *vdso; | ||
19 | } mm_context_t; | ||
20 | |||
21 | #endif /* CONFIG_MMU */ | ||
22 | |||
23 | /* | 17 | /* |
24 | * Privileged Space Mapping Buffer (PMB) definitions | 18 | * Privileged Space Mapping Buffer (PMB) definitions |
25 | */ | 19 | */ |
diff --git a/include/asm-sh/mmu_context.h b/include/asm-sh/mmu_context.h index 46f04e23bd45..342024425b7d 100644 --- a/include/asm-sh/mmu_context.h +++ b/include/asm-sh/mmu_context.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 1999 Niibe Yutaka | 2 | * Copyright (C) 1999 Niibe Yutaka |
3 | * Copyright (C) 2003 Paul Mundt | 3 | * Copyright (C) 2003 - 2006 Paul Mundt |
4 | * | 4 | * |
5 | * ASID handling idea taken from MIPS implementation. | 5 | * ASID handling idea taken from MIPS implementation. |
6 | */ | 6 | */ |
@@ -19,11 +19,6 @@ | |||
19 | * (b) ASID (Address Space IDentifier) | 19 | * (b) ASID (Address Space IDentifier) |
20 | */ | 20 | */ |
21 | 21 | ||
22 | /* | ||
23 | * Cache of MMU context last used. | ||
24 | */ | ||
25 | extern unsigned long mmu_context_cache; | ||
26 | |||
27 | #define MMU_CONTEXT_ASID_MASK 0x000000ff | 22 | #define MMU_CONTEXT_ASID_MASK 0x000000ff |
28 | #define MMU_CONTEXT_VERSION_MASK 0xffffff00 | 23 | #define MMU_CONTEXT_VERSION_MASK 0xffffff00 |
29 | #define MMU_CONTEXT_FIRST_VERSION 0x00000100 | 24 | #define MMU_CONTEXT_FIRST_VERSION 0x00000100 |
@@ -32,6 +27,11 @@ extern unsigned long mmu_context_cache; | |||
32 | /* ASID is 8-bit value, so it can't be 0x100 */ | 27 | /* ASID is 8-bit value, so it can't be 0x100 */ |
33 | #define MMU_NO_ASID 0x100 | 28 | #define MMU_NO_ASID 0x100 |
34 | 29 | ||
30 | #define cpu_context(cpu, mm) ((mm)->context.id[cpu]) | ||
31 | #define cpu_asid(cpu, mm) (cpu_context((cpu), (mm)) & \ | ||
32 | MMU_CONTEXT_ASID_MASK) | ||
33 | #define asid_cache(cpu) (cpu_data[cpu].asid_cache) | ||
34 | |||
35 | /* | 35 | /* |
36 | * Virtual Page Number mask | 36 | * Virtual Page Number mask |
37 | */ | 37 | */ |
@@ -41,18 +41,17 @@ extern unsigned long mmu_context_cache; | |||
41 | /* | 41 | /* |
42 | * Get MMU context if needed. | 42 | * Get MMU context if needed. |
43 | */ | 43 | */ |
44 | static inline void get_mmu_context(struct mm_struct *mm) | 44 | static inline void get_mmu_context(struct mm_struct *mm, unsigned int cpu) |
45 | { | 45 | { |
46 | unsigned long mc = mmu_context_cache; | 46 | unsigned long asid = asid_cache(cpu); |
47 | 47 | ||
48 | /* Check if we have old version of context. */ | 48 | /* Check if we have old version of context. */ |
49 | if (((mm->context.id ^ mc) & MMU_CONTEXT_VERSION_MASK) == 0) | 49 | if (((cpu_context(cpu, mm) ^ asid) & MMU_CONTEXT_VERSION_MASK) == 0) |
50 | /* It's up to date, do nothing */ | 50 | /* It's up to date, do nothing */ |
51 | return; | 51 | return; |
52 | 52 | ||
53 | /* It's old, we need to get new context with new version. */ | 53 | /* It's old, we need to get new context with new version. */ |
54 | mc = ++mmu_context_cache; | 54 | if (!(++asid & MMU_CONTEXT_ASID_MASK)) { |
55 | if (!(mc & MMU_CONTEXT_ASID_MASK)) { | ||
56 | /* | 55 | /* |
57 | * We exhaust ASID of this version. | 56 | * We exhaust ASID of this version. |
58 | * Flush all TLB and start new cycle. | 57 | * Flush all TLB and start new cycle. |
@@ -63,10 +62,11 @@ static inline void get_mmu_context(struct mm_struct *mm) | |||
63 | * Fix version; Note that we avoid version #0 | 62 | * Fix version; Note that we avoid version #0 |
64 | * to distingush NO_CONTEXT. | 63 | * to distingush NO_CONTEXT. |
65 | */ | 64 | */ |
66 | if (!mc) | 65 | if (!asid) |
67 | mmu_context_cache = mc = MMU_CONTEXT_FIRST_VERSION; | 66 | asid = MMU_CONTEXT_FIRST_VERSION; |
68 | } | 67 | } |
69 | mm->context.id = mc; | 68 | |
69 | cpu_context(cpu, mm) = asid_cache(cpu) = asid; | ||
70 | } | 70 | } |
71 | 71 | ||
72 | /* | 72 | /* |
@@ -74,9 +74,13 @@ static inline void get_mmu_context(struct mm_struct *mm) | |||
74 | * instance. | 74 | * instance. |
75 | */ | 75 | */ |
76 | static inline int init_new_context(struct task_struct *tsk, | 76 | static inline int init_new_context(struct task_struct *tsk, |
77 | struct mm_struct *mm) | 77 | struct mm_struct *mm) |
78 | { | 78 | { |
79 | mm->context.id = NO_CONTEXT; | 79 | int i; |
80 | |||
81 | for (i = 0; i < num_online_cpus(); i++) | ||
82 | cpu_context(i, mm) = NO_CONTEXT; | ||
83 | |||
80 | return 0; | 84 | return 0; |
81 | } | 85 | } |
82 | 86 | ||
@@ -117,10 +121,10 @@ static inline unsigned long get_asid(void) | |||
117 | * After we have set current->mm to a new value, this activates | 121 | * After we have set current->mm to a new value, this activates |
118 | * the context for the new mm so we see the new mappings. | 122 | * the context for the new mm so we see the new mappings. |
119 | */ | 123 | */ |
120 | static inline void activate_context(struct mm_struct *mm) | 124 | static inline void activate_context(struct mm_struct *mm, unsigned int cpu) |
121 | { | 125 | { |
122 | get_mmu_context(mm); | 126 | get_mmu_context(mm, cpu); |
123 | set_asid(mm->context.id & MMU_CONTEXT_ASID_MASK); | 127 | set_asid(cpu_asid(cpu, mm)); |
124 | } | 128 | } |
125 | 129 | ||
126 | /* MMU_TTB is used for optimizing the fault handling. */ | 130 | /* MMU_TTB is used for optimizing the fault handling. */ |
@@ -138,10 +142,15 @@ static inline void switch_mm(struct mm_struct *prev, | |||
138 | struct mm_struct *next, | 142 | struct mm_struct *next, |
139 | struct task_struct *tsk) | 143 | struct task_struct *tsk) |
140 | { | 144 | { |
145 | unsigned int cpu = smp_processor_id(); | ||
146 | |||
141 | if (likely(prev != next)) { | 147 | if (likely(prev != next)) { |
148 | cpu_set(cpu, next->cpu_vm_mask); | ||
142 | set_TTB(next->pgd); | 149 | set_TTB(next->pgd); |
143 | activate_context(next); | 150 | activate_context(next, cpu); |
144 | } | 151 | } else |
152 | if (!cpu_test_and_set(cpu, next->cpu_vm_mask)) | ||
153 | activate_context(next, cpu); | ||
145 | } | 154 | } |
146 | 155 | ||
147 | #define deactivate_mm(tsk,mm) do { } while (0) | 156 | #define deactivate_mm(tsk,mm) do { } while (0) |
@@ -159,7 +168,7 @@ enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) | |||
159 | #define destroy_context(mm) do { } while (0) | 168 | #define destroy_context(mm) do { } while (0) |
160 | #define set_asid(asid) do { } while (0) | 169 | #define set_asid(asid) do { } while (0) |
161 | #define get_asid() (0) | 170 | #define get_asid() (0) |
162 | #define activate_context(mm) do { } while (0) | 171 | #define activate_context(mm,cpu) do { } while (0) |
163 | #define switch_mm(prev,next,tsk) do { } while (0) | 172 | #define switch_mm(prev,next,tsk) do { } while (0) |
164 | #define deactivate_mm(tsk,mm) do { } while (0) | 173 | #define deactivate_mm(tsk,mm) do { } while (0) |
165 | #define activate_mm(prev,next) do { } while (0) | 174 | #define activate_mm(prev,next) do { } while (0) |
@@ -174,14 +183,16 @@ enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) | |||
174 | */ | 183 | */ |
175 | static inline void enable_mmu(void) | 184 | static inline void enable_mmu(void) |
176 | { | 185 | { |
186 | unsigned int cpu = smp_processor_id(); | ||
187 | |||
177 | /* Enable MMU */ | 188 | /* Enable MMU */ |
178 | ctrl_outl(MMU_CONTROL_INIT, MMUCR); | 189 | ctrl_outl(MMU_CONTROL_INIT, MMUCR); |
179 | ctrl_barrier(); | 190 | ctrl_barrier(); |
180 | 191 | ||
181 | if (mmu_context_cache == NO_CONTEXT) | 192 | if (asid_cache(cpu) == NO_CONTEXT) |
182 | mmu_context_cache = MMU_CONTEXT_FIRST_VERSION; | 193 | asid_cache(cpu) = MMU_CONTEXT_FIRST_VERSION; |
183 | 194 | ||
184 | set_asid(mmu_context_cache & MMU_CONTEXT_ASID_MASK); | 195 | set_asid(asid_cache(cpu) & MMU_CONTEXT_ASID_MASK); |
185 | } | 196 | } |
186 | 197 | ||
187 | static inline void disable_mmu(void) | 198 | static inline void disable_mmu(void) |
diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h index 380fd62dd05a..ac4b4677f28c 100644 --- a/include/asm-sh/page.h +++ b/include/asm-sh/page.h | |||
@@ -13,6 +13,8 @@ | |||
13 | [ P4 control ] 0xE0000000 | 13 | [ P4 control ] 0xE0000000 |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #ifdef __KERNEL__ | ||
17 | |||
16 | /* PAGE_SHIFT determines the page size */ | 18 | /* PAGE_SHIFT determines the page size */ |
17 | #if defined(CONFIG_PAGE_SIZE_4KB) | 19 | #if defined(CONFIG_PAGE_SIZE_4KB) |
18 | # define PAGE_SHIFT 12 | 20 | # define PAGE_SHIFT 12 |
@@ -51,7 +53,6 @@ | |||
51 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT-PAGE_SHIFT) | 53 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT-PAGE_SHIFT) |
52 | #endif | 54 | #endif |
53 | 55 | ||
54 | #ifdef __KERNEL__ | ||
55 | #ifndef __ASSEMBLY__ | 56 | #ifndef __ASSEMBLY__ |
56 | 57 | ||
57 | extern void (*clear_page)(void *to); | 58 | extern void (*clear_page)(void *to); |
diff --git a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h index 036ca2843866..9214c015fe14 100644 --- a/include/asm-sh/pgtable.h +++ b/include/asm-sh/pgtable.h | |||
@@ -43,17 +43,17 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)]; | |||
43 | /* PGD bits */ | 43 | /* PGD bits */ |
44 | #define PGDIR_SHIFT (PTE_SHIFT + PTE_BITS) | 44 | #define PGDIR_SHIFT (PTE_SHIFT + PTE_BITS) |
45 | #define PGDIR_BITS (32 - PGDIR_SHIFT) | 45 | #define PGDIR_BITS (32 - PGDIR_SHIFT) |
46 | #define PGDIR_SIZE (1 << PGDIR_SHIFT) | 46 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) |
47 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) | 47 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) |
48 | 48 | ||
49 | /* Entries per level */ | 49 | /* Entries per level */ |
50 | #define PTRS_PER_PTE (PAGE_SIZE / 4) | 50 | #define PTRS_PER_PTE (PAGE_SIZE / (1 << PTE_MAGNITUDE)) |
51 | #define PTRS_PER_PGD (PAGE_SIZE / 4) | 51 | #define PTRS_PER_PGD (PAGE_SIZE / 4) |
52 | 52 | ||
53 | #define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE) | 53 | #define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE) |
54 | #define FIRST_USER_ADDRESS 0 | 54 | #define FIRST_USER_ADDRESS 0 |
55 | 55 | ||
56 | #define PTE_PHYS_MASK 0x1ffff000 | 56 | #define PTE_PHYS_MASK (0x20000000 - PAGE_SIZE) |
57 | 57 | ||
58 | /* | 58 | /* |
59 | * First 1MB map is used by fixed purpose. | 59 | * First 1MB map is used by fixed purpose. |
@@ -583,11 +583,6 @@ struct mm_struct; | |||
583 | extern unsigned int kobjsize(const void *objp); | 583 | extern unsigned int kobjsize(const void *objp); |
584 | #endif /* !CONFIG_MMU */ | 584 | #endif /* !CONFIG_MMU */ |
585 | 585 | ||
586 | #if defined(CONFIG_CPU_SH4) || defined(CONFIG_SH7705_CACHE_32KB) | ||
587 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR | ||
588 | extern pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep); | ||
589 | #endif | ||
590 | |||
591 | extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; | 586 | extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; |
592 | extern void paging_init(void); | 587 | extern void paging_init(void); |
593 | 588 | ||
diff --git a/include/asm-sh/processor.h b/include/asm-sh/processor.h index e29f2abb92de..3e46a7afe764 100644 --- a/include/asm-sh/processor.h +++ b/include/asm-sh/processor.h | |||
@@ -27,8 +27,6 @@ | |||
27 | #define CCN_CVR 0xff000040 | 27 | #define CCN_CVR 0xff000040 |
28 | #define CCN_PRR 0xff000044 | 28 | #define CCN_PRR 0xff000044 |
29 | 29 | ||
30 | const char *get_cpu_subtype(void); | ||
31 | |||
32 | /* | 30 | /* |
33 | * CPU type and hardware bug flags. Kept separately for each CPU. | 31 | * CPU type and hardware bug flags. Kept separately for each CPU. |
34 | * | 32 | * |
@@ -66,6 +64,7 @@ enum cpu_type { | |||
66 | struct sh_cpuinfo { | 64 | struct sh_cpuinfo { |
67 | unsigned int type; | 65 | unsigned int type; |
68 | unsigned long loops_per_jiffy; | 66 | unsigned long loops_per_jiffy; |
67 | unsigned long asid_cache; | ||
69 | 68 | ||
70 | struct cache_info icache; /* Primary I-cache */ | 69 | struct cache_info icache; /* Primary I-cache */ |
71 | struct cache_info dcache; /* Primary D-cache */ | 70 | struct cache_info dcache; /* Primary D-cache */ |
@@ -288,5 +287,8 @@ extern int vsyscall_init(void); | |||
288 | #define vsyscall_init() do { } while (0) | 287 | #define vsyscall_init() do { } while (0) |
289 | #endif | 288 | #endif |
290 | 289 | ||
290 | /* arch/sh/kernel/setup.c */ | ||
291 | const char *get_cpu_subtype(struct sh_cpuinfo *c); | ||
292 | |||
291 | #endif /* __KERNEL__ */ | 293 | #endif /* __KERNEL__ */ |
292 | #endif /* __ASM_SH_PROCESSOR_H */ | 294 | #endif /* __ASM_SH_PROCESSOR_H */ |
diff --git a/include/asm-sh/rts7751r2d.h b/include/asm-sh/rts7751r2d.h index 796b8fcb81a8..10565ac7966a 100644 --- a/include/asm-sh/rts7751r2d.h +++ b/include/asm-sh/rts7751r2d.h | |||
@@ -68,6 +68,10 @@ | |||
68 | #define IRQ_PCISLOT2 10 /* PCI Slot #2 IRQ */ | 68 | #define IRQ_PCISLOT2 10 /* PCI Slot #2 IRQ */ |
69 | #define IRQ_EXTENTION 11 /* EXTn IRQ */ | 69 | #define IRQ_EXTENTION 11 /* EXTn IRQ */ |
70 | 70 | ||
71 | /* arch/sh/boards/renesas/rts7751r2d/irq.c */ | ||
72 | void init_rts7751r2d_IRQ(void); | ||
73 | int rts7751r2d_irq_demux(int); | ||
74 | |||
71 | #define __IO_PREFIX rts7751r2d | 75 | #define __IO_PREFIX rts7751r2d |
72 | #include <asm/io_generic.h> | 76 | #include <asm/io_generic.h> |
73 | 77 | ||
diff --git a/include/asm-sh/serial.h b/include/asm-sh/serial.h index 8734590d27e8..21f6d330f189 100644 --- a/include/asm-sh/serial.h +++ b/include/asm-sh/serial.h | |||
@@ -9,11 +9,6 @@ | |||
9 | 9 | ||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | 11 | ||
12 | #ifdef CONFIG_SH_EC3104 | ||
13 | #include <asm/serial-ec3104.h> | ||
14 | #elif defined (CONFIG_SH_BIGSUR) | ||
15 | #include <asm/serial-bigsur.h> | ||
16 | #else | ||
17 | /* | 12 | /* |
18 | * This assumes you have a 1.8432 MHz clock for your UART. | 13 | * This assumes you have a 1.8432 MHz clock for your UART. |
19 | * | 14 | * |
@@ -34,12 +29,8 @@ | |||
34 | 29 | ||
35 | #else | 30 | #else |
36 | 31 | ||
37 | #define SERIAL_PORT_DFNS \ | 32 | #define SERIAL_PORT_DFNS |
38 | /* UART CLK PORT IRQ FLAGS */ \ | ||
39 | { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ | ||
40 | { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS } /* ttyS1 */ | ||
41 | 33 | ||
42 | #endif | 34 | #endif |
43 | 35 | ||
44 | #endif | ||
45 | #endif /* _ASM_SERIAL_H */ | 36 | #endif /* _ASM_SERIAL_H */ |
diff --git a/include/asm-sh/termios.h b/include/asm-sh/termios.h index 44edfd471443..e7c8f86ef890 100644 --- a/include/asm-sh/termios.h +++ b/include/asm-sh/termios.h | |||
@@ -39,24 +39,6 @@ struct termio { | |||
39 | 39 | ||
40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
41 | 41 | ||
42 | /* line disciplines */ | ||
43 | #define N_TTY 0 | ||
44 | #define N_SLIP 1 | ||
45 | #define N_MOUSE 2 | ||
46 | #define N_PPP 3 | ||
47 | #define N_STRIP 4 | ||
48 | #define N_AX25 5 | ||
49 | #define N_X25 6 /* X.25 async */ | ||
50 | #define N_6PACK 7 | ||
51 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
52 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
53 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
54 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
55 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
56 | #define N_HDLC 13 /* synchronous HDLC */ | ||
57 | #define N_SYNC_PPP 14 | ||
58 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
59 | |||
60 | #ifdef __KERNEL__ | 42 | #ifdef __KERNEL__ |
61 | 43 | ||
62 | /* intr=^C quit=^\ erase=del kill=^U | 44 | /* intr=^C quit=^\ erase=del kill=^U |
diff --git a/include/asm-sh/thread_info.h b/include/asm-sh/thread_info.h index 879f741105db..279e70a77c75 100644 --- a/include/asm-sh/thread_info.h +++ b/include/asm-sh/thread_info.h | |||
@@ -32,12 +32,20 @@ struct thread_info { | |||
32 | 32 | ||
33 | #define PREEMPT_ACTIVE 0x10000000 | 33 | #define PREEMPT_ACTIVE 0x10000000 |
34 | 34 | ||
35 | #ifdef CONFIG_4KSTACKS | 35 | #if defined(CONFIG_4KSTACKS) |
36 | #define THREAD_SIZE (PAGE_SIZE) | 36 | #define THREAD_SIZE_ORDER (0) |
37 | #elif defined(CONFIG_PAGE_SIZE_4KB) | ||
38 | #define THREAD_SIZE_ORDER (1) | ||
39 | #elif defined(CONFIG_PAGE_SIZE_8KB) | ||
40 | #define THREAD_SIZE_ORDER (1) | ||
41 | #elif defined(CONFIG_PAGE_SIZE_64KB) | ||
42 | #define THREAD_SIZE_ORDER (0) | ||
37 | #else | 43 | #else |
38 | #define THREAD_SIZE (PAGE_SIZE * 2) | 44 | #error "Unknown thread size" |
39 | #endif | 45 | #endif |
40 | #define STACK_WARN (THREAD_SIZE / 8) | 46 | |
47 | #define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER) | ||
48 | #define STACK_WARN (THREAD_SIZE >> 3) | ||
41 | 49 | ||
42 | /* | 50 | /* |
43 | * macros/functions for gaining access to the thread information structure | 51 | * macros/functions for gaining access to the thread information structure |
diff --git a/include/asm-sh/tlbflush.h b/include/asm-sh/tlbflush.h index 28c073b0fbab..455fb8da441e 100644 --- a/include/asm-sh/tlbflush.h +++ b/include/asm-sh/tlbflush.h | |||
@@ -4,7 +4,6 @@ | |||
4 | /* | 4 | /* |
5 | * TLB flushing: | 5 | * TLB flushing: |
6 | * | 6 | * |
7 | * - flush_tlb() flushes the current mm struct TLBs | ||
8 | * - flush_tlb_all() flushes all processes TLBs | 7 | * - flush_tlb_all() flushes all processes TLBs |
9 | * - flush_tlb_mm(mm) flushes the specified mm context TLB's | 8 | * - flush_tlb_mm(mm) flushes the specified mm context TLB's |
10 | * - flush_tlb_page(vma, vmaddr) flushes one page | 9 | * - flush_tlb_page(vma, vmaddr) flushes one page |
@@ -12,20 +11,45 @@ | |||
12 | * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages | 11 | * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages |
13 | * - flush_tlb_pgtables(mm, start, end) flushes a range of page tables | 12 | * - flush_tlb_pgtables(mm, start, end) flushes a range of page tables |
14 | */ | 13 | */ |
14 | extern void local_flush_tlb_all(void); | ||
15 | extern void local_flush_tlb_mm(struct mm_struct *mm); | ||
16 | extern void local_flush_tlb_range(struct vm_area_struct *vma, | ||
17 | unsigned long start, | ||
18 | unsigned long end); | ||
19 | extern void local_flush_tlb_page(struct vm_area_struct *vma, | ||
20 | unsigned long page); | ||
21 | extern void local_flush_tlb_kernel_range(unsigned long start, | ||
22 | unsigned long end); | ||
23 | extern void local_flush_tlb_one(unsigned long asid, unsigned long page); | ||
24 | |||
25 | #ifdef CONFIG_SMP | ||
15 | 26 | ||
16 | extern void flush_tlb(void); | ||
17 | extern void flush_tlb_all(void); | 27 | extern void flush_tlb_all(void); |
18 | extern void flush_tlb_mm(struct mm_struct *mm); | 28 | extern void flush_tlb_mm(struct mm_struct *mm); |
19 | extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, | 29 | extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, |
20 | unsigned long end); | 30 | unsigned long end); |
21 | extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long page); | 31 | extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long page); |
22 | extern void __flush_tlb_page(unsigned long asid, unsigned long page); | 32 | extern void flush_tlb_kernel_range(unsigned long start, unsigned long end); |
33 | extern void flush_tlb_one(unsigned long asid, unsigned long page); | ||
34 | |||
35 | #else | ||
36 | |||
37 | #define flush_tlb_all() local_flush_tlb_all() | ||
38 | #define flush_tlb_mm(mm) local_flush_tlb_mm(mm) | ||
39 | #define flush_tlb_page(vma, page) local_flush_tlb_page(vma, page) | ||
40 | #define flush_tlb_one(asid, page) local_flush_tlb_one(asid, page) | ||
41 | |||
42 | #define flush_tlb_range(vma, start, end) \ | ||
43 | local_flush_tlb_range(vma, start, end) | ||
44 | |||
45 | #define flush_tlb_kernel_range(start, end) \ | ||
46 | local_flush_tlb_kernel_range(start, end) | ||
47 | |||
48 | #endif /* CONFIG_SMP */ | ||
23 | 49 | ||
24 | static inline void flush_tlb_pgtables(struct mm_struct *mm, | 50 | static inline void flush_tlb_pgtables(struct mm_struct *mm, |
25 | unsigned long start, unsigned long end) | 51 | unsigned long start, unsigned long end) |
26 | { /* Nothing to do */ | 52 | { |
53 | /* Nothing to do */ | ||
27 | } | 54 | } |
28 | |||
29 | extern void flush_tlb_kernel_range(unsigned long start, unsigned long end); | ||
30 | |||
31 | #endif /* __ASM_SH_TLBFLUSH_H */ | 55 | #endif /* __ASM_SH_TLBFLUSH_H */ |
diff --git a/include/asm-sh/ubc.h b/include/asm-sh/ubc.h index 694f51f47941..ae9bbdeefbe1 100644 --- a/include/asm-sh/ubc.h +++ b/include/asm-sh/ubc.h | |||
@@ -17,7 +17,7 @@ | |||
17 | /* User Break Controller */ | 17 | /* User Break Controller */ |
18 | #if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) || \ | 18 | #if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) || \ |
19 | defined(CONFIG_CPU_SUBTYPE_SH7300) | 19 | defined(CONFIG_CPU_SUBTYPE_SH7300) |
20 | #define UBC_TYPE_SH7729 (cpu_data->type == CPU_SH7729) | 20 | #define UBC_TYPE_SH7729 (current_cpu_data.type == CPU_SH7729) |
21 | #else | 21 | #else |
22 | #define UBC_TYPE_SH7729 0 | 22 | #define UBC_TYPE_SH7729 0 |
23 | #endif | 23 | #endif |
diff --git a/include/asm-sh/unistd.h b/include/asm-sh/unistd.h index f982073dc6c6..17f527bfd455 100644 --- a/include/asm-sh/unistd.h +++ b/include/asm-sh/unistd.h | |||
@@ -292,22 +292,22 @@ | |||
292 | #define __NR_mq_getsetattr (__NR_mq_open+5) | 292 | #define __NR_mq_getsetattr (__NR_mq_open+5) |
293 | #define __NR_kexec_load 283 | 293 | #define __NR_kexec_load 283 |
294 | #define __NR_waitid 284 | 294 | #define __NR_waitid 284 |
295 | /* #define __NR_sys_setaltroot 285 */ | 295 | #define __NR_add_key 285 |
296 | #define __NR_add_key 286 | 296 | #define __NR_request_key 286 |
297 | #define __NR_request_key 287 | 297 | #define __NR_keyctl 287 |
298 | #define __NR_keyctl 288 | 298 | #define __NR_ioprio_set 288 |
299 | #define __NR_ioprio_set 289 | 299 | #define __NR_ioprio_get 289 |
300 | #define __NR_ioprio_get 290 | 300 | #define __NR_inotify_init 290 |
301 | #define __NR_inotify_init 291 | 301 | #define __NR_inotify_add_watch 291 |
302 | #define __NR_inotify_add_watch 292 | 302 | #define __NR_inotify_rm_watch 292 |
303 | #define __NR_inotify_rm_watch 293 | 303 | /* 293 is unused */ |
304 | #define __NR_migrate_pages 294 | 304 | #define __NR_migrate_pages 294 |
305 | #define __NR_openat 295 | 305 | #define __NR_openat 295 |
306 | #define __NR_mkdirat 296 | 306 | #define __NR_mkdirat 296 |
307 | #define __NR_mknodat 297 | 307 | #define __NR_mknodat 297 |
308 | #define __NR_fchownat 298 | 308 | #define __NR_fchownat 298 |
309 | #define __NR_futimesat 299 | 309 | #define __NR_futimesat 299 |
310 | #define __NR_newfstatat 300 | 310 | #define __NR_fstatat64 300 |
311 | #define __NR_unlinkat 301 | 311 | #define __NR_unlinkat 301 |
312 | #define __NR_renameat 302 | 312 | #define __NR_renameat 302 |
313 | #define __NR_linkat 303 | 313 | #define __NR_linkat 303 |
diff --git a/include/asm-sh/voyagergx.h b/include/asm-sh/voyagergx.h index 99b0807d1c9f..64c936b22715 100644 --- a/include/asm-sh/voyagergx.h +++ b/include/asm-sh/voyagergx.h | |||
@@ -308,6 +308,9 @@ | |||
308 | #define AC97C_READ (1 << 19) | 308 | #define AC97C_READ (1 << 19) |
309 | #define AC97C_WD_BIT (1 << 2) | 309 | #define AC97C_WD_BIT (1 << 2) |
310 | #define AC97C_INDEX_MASK 0x7f | 310 | #define AC97C_INDEX_MASK 0x7f |
311 | /* -------------------------------------------------------------------- */ | 311 | |
312 | /* arch/sh/cchips/voyagergx/consistent.c */ | ||
313 | void *voyagergx_consistent_alloc(struct device *, size_t, dma_addr_t *, gfp_t); | ||
314 | int voyagergx_consistent_free(struct device *, size_t, void *, dma_addr_t); | ||
312 | 315 | ||
313 | #endif /* _VOYAGER_GX_REG_H */ | 316 | #endif /* _VOYAGER_GX_REG_H */ |