Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: Remove TX39XX support

No (active) developer owns this hardware, so let's remove Linux support.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>

+18 -2212
-1
arch/mips/Kbuild.platforms
··· 32 32 platform-$(CONFIG_SIBYTE_BCM1x55) += sibyte/ 33 33 platform-$(CONFIG_SIBYTE_BCM1x80) += sibyte/ 34 34 platform-$(CONFIG_SNI_RM) += sni/ 35 - platform-$(CONFIG_MACH_TX39XX) += txx9/ 36 35 platform-$(CONFIG_MACH_TX49XX) += txx9/ 37 36 platform-$(CONFIG_MACH_VR41XX) += vr41xx/ 38 37
+6 -18
arch/mips/Kconfig
··· 927 927 Technology and now in turn merged with Fujitsu. Say Y here to 928 928 support this machine type. 929 929 930 - config MACH_TX39XX 931 - bool "Toshiba TX39 series based machines" 932 - 933 930 config MACH_TX49XX 934 931 bool "Toshiba TX49 series based machines" 935 932 select WAR_TX49XX_ICACHE_INDEX_INV ··· 1581 1584 might be a safe bet. If the resulting kernel does not work, 1582 1585 try to recompile with R3000. 1583 1586 1584 - config CPU_TX39XX 1585 - bool "R39XX" 1586 - depends on SYS_HAS_CPU_TX39XX 1587 - select CPU_SUPPORTS_32BIT_KERNEL 1588 - select CPU_R3K_TLB 1589 - 1590 1587 config CPU_VR41XX 1591 1588 bool "R41xx" 1592 1589 depends on SYS_HAS_CPU_VR41XX ··· 1907 1916 config SYS_HAS_CPU_R3000 1908 1917 bool 1909 1918 1910 - config SYS_HAS_CPU_TX39XX 1911 - bool 1912 - 1913 1919 config SYS_HAS_CPU_VR41XX 1914 1920 bool 1915 1921 ··· 2137 2149 2138 2150 config PAGE_SIZE_16KB 2139 2151 bool "16kB" 2140 - depends on !CPU_R3000 && !CPU_TX39XX 2152 + depends on !CPU_R3000 2141 2153 help 2142 2154 Using 16kB page size will result in higher performance kernel at 2143 2155 the price of higher memory consumption. This option is available on ··· 2156 2168 2157 2169 config PAGE_SIZE_64KB 2158 2170 bool "64kB" 2159 - depends on !CPU_R3000 && !CPU_TX39XX 2171 + depends on !CPU_R3000 2160 2172 help 2161 2173 Using 64kB page size will result in higher performance kernel at 2162 2174 the price of higher memory consumption. This option is available on ··· 2224 2236 2225 2237 config CPU_GENERIC_DUMP_TLB 2226 2238 bool 2227 - default y if !(CPU_R3000 || CPU_TX39XX) 2239 + default y if !CPU_R3000 2228 2240 2229 2241 config MIPS_FP_SUPPORT 2230 2242 bool "Floating Point support" if EXPERT ··· 2244 2256 config CPU_R2300_FPU 2245 2257 bool 2246 2258 depends on MIPS_FP_SUPPORT 2247 - default y if CPU_R3000 || CPU_TX39XX 2259 + default y if CPU_R3000 2248 2260 2249 2261 config CPU_R3K_TLB 2250 2262 bool ··· 2563 2575 2564 2576 config MIPS_ASID_SHIFT 2565 2577 int 2566 - default 6 if CPU_R3000 || CPU_TX39XX 2578 + default 6 if CPU_R3000 2567 2579 default 0 2568 2580 2569 2581 config MIPS_ASID_BITS 2570 2582 int 2571 2583 default 0 if MIPS_ASID_BITS_VARIABLE 2572 - default 6 if CPU_R3000 || CPU_TX39XX 2584 + default 6 if CPU_R3000 2573 2585 default 8 2574 2586 2575 2587 config MIPS_ASID_BITS_VARIABLE
-1
arch/mips/Makefile
··· 158 158 # CPU-dependent compiler/assembler options for optimization. 159 159 # 160 160 cflags-$(CONFIG_CPU_R3000) += -march=r3000 161 - cflags-$(CONFIG_CPU_TX39XX) += -march=r3900 162 161 cflags-$(CONFIG_CPU_R4300) += -march=r4300 -Wa,--trap 163 162 cflags-$(CONFIG_CPU_VR41XX) += -march=r4100 -Wa,--trap 164 163 cflags-$(CONFIG_CPU_R4X00) += -march=r4600 -Wa,--trap
-50
arch/mips/configs/jmr3927_defconfig
··· 1 - CONFIG_SYSVIPC=y 2 - CONFIG_LOG_BUF_SHIFT=14 3 - CONFIG_EXPERT=y 4 - CONFIG_SLAB=y 5 - CONFIG_MACH_TX39XX=y 6 - CONFIG_TOSHIBA_JMR3927=y 7 - # CONFIG_SECCOMP is not set 8 - CONFIG_PCI=y 9 - CONFIG_NET=y 10 - CONFIG_PACKET=y 11 - CONFIG_UNIX=y 12 - CONFIG_INET=y 13 - CONFIG_IP_PNP=y 14 - CONFIG_IP_PNP_BOOTP=y 15 - # CONFIG_INET_XFRM_MODE_TRANSPORT is not set 16 - # CONFIG_INET_XFRM_MODE_TUNNEL is not set 17 - # CONFIG_INET_XFRM_MODE_BEET is not set 18 - # CONFIG_INET_DIAG is not set 19 - # CONFIG_IPV6 is not set 20 - CONFIG_MTD=y 21 - CONFIG_MTD_CMDLINE_PARTS=y 22 - CONFIG_MTD_CFI=y 23 - CONFIG_MTD_JEDECPROBE=y 24 - CONFIG_MTD_CFI_AMDSTD=y 25 - CONFIG_MTD_PHYSMAP=y 26 - CONFIG_NETDEVICES=y 27 - CONFIG_TC35815=y 28 - # CONFIG_INPUT is not set 29 - # CONFIG_SERIO is not set 30 - # CONFIG_VT is not set 31 - # CONFIG_UNIX98_PTYS is not set 32 - CONFIG_SERIAL_NONSTANDARD=y 33 - CONFIG_SERIAL_TXX9_CONSOLE=y 34 - CONFIG_SERIAL_TXX9_STDSERIAL=y 35 - # CONFIG_HW_RANDOM is not set 36 - # CONFIG_HWMON is not set 37 - CONFIG_WATCHDOG=y 38 - CONFIG_TXX9_WDT=y 39 - # CONFIG_USB_SUPPORT is not set 40 - CONFIG_NEW_LEDS=y 41 - CONFIG_LEDS_CLASS=y 42 - CONFIG_LEDS_GPIO=y 43 - CONFIG_LEDS_TRIGGERS=y 44 - CONFIG_LEDS_TRIGGER_HEARTBEAT=y 45 - CONFIG_RTC_CLASS=y 46 - CONFIG_RTC_DRV_DS1742=y 47 - CONFIG_PROC_KCORE=y 48 - # CONFIG_MISC_FILESYSTEMS is not set 49 - CONFIG_NFS_FS=y 50 - CONFIG_ROOT_NFS=y
-3
arch/mips/include/asm/cpu-features.h
··· 120 120 #ifndef cpu_has_4k_cache 121 121 #define cpu_has_4k_cache __isa_ge_or_opt(1, MIPS_CPU_4K_CACHE) 122 122 #endif 123 - #ifndef cpu_has_tx39_cache 124 - #define cpu_has_tx39_cache __opt(MIPS_CPU_TX39_CACHE) 125 - #endif 126 123 #ifndef cpu_has_octeon_cache 127 124 #define cpu_has_octeon_cache 0 128 125 #endif
-6
arch/mips/include/asm/cpu-type.h
··· 105 105 case CPU_R3081E: 106 106 #endif 107 107 108 - #ifdef CONFIG_SYS_HAS_CPU_TX39XX 109 - case CPU_TX3912: 110 - case CPU_TX3922: 111 - case CPU_TX3927: 112 - #endif 113 - 114 108 #ifdef CONFIG_SYS_HAS_CPU_VR41XX 115 109 case CPU_VR41XX: 116 110 case CPU_VR4111:
-6
arch/mips/include/asm/cpu.h
··· 310 310 CPU_SR71000, CPU_TX49XX, 311 311 312 312 /* 313 - * TX3900 class processors 314 - */ 315 - CPU_TX3912, CPU_TX3922, CPU_TX3927, 316 - 317 - /* 318 313 * MIPS32 class processors 319 314 */ 320 315 CPU_4KC, CPU_4KEC, CPU_4KSC, CPU_24K, CPU_34K, CPU_1004K, CPU_74K, ··· 362 367 #define MIPS_CPU_4KEX BIT_ULL( 1) /* "R4K" exception model */ 363 368 #define MIPS_CPU_3K_CACHE BIT_ULL( 2) /* R3000-style caches */ 364 369 #define MIPS_CPU_4K_CACHE BIT_ULL( 3) /* R4000-style caches */ 365 - #define MIPS_CPU_TX39_CACHE BIT_ULL( 4) /* TX3900-style caches */ 366 370 #define MIPS_CPU_FPU BIT_ULL( 5) /* CPU has FPU */ 367 371 #define MIPS_CPU_32FPR BIT_ULL( 6) /* 32 dbl. prec. FP registers */ 368 372 #define MIPS_CPU_COUNTER BIT_ULL( 7) /* Cycle count/compare */
+1 -1
arch/mips/include/asm/isadep.h
··· 10 10 #ifndef __ASM_ISADEP_H 11 11 #define __ASM_ISADEP_H 12 12 13 - #if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX) 13 + #if defined(CONFIG_CPU_R3000) 14 14 /* 15 15 * R2000 or R3000 16 16 */
-1
arch/mips/include/asm/mach-ath25/cpu-feature-overrides.h
··· 18 18 #define cpu_has_4kex 1 19 19 #define cpu_has_3k_cache 0 20 20 #define cpu_has_4k_cache 1 21 - #define cpu_has_tx39_cache 0 22 21 #define cpu_has_sb1_cache 0 23 22 #define cpu_has_fpu 0 24 23 #define cpu_has_32fpr 0
-1
arch/mips/include/asm/mach-ath79/cpu-feature-overrides.h
··· 16 16 #define cpu_has_4kex 1 17 17 #define cpu_has_3k_cache 0 18 18 #define cpu_has_4k_cache 1 19 - #define cpu_has_tx39_cache 0 20 19 #define cpu_has_sb1_cache 0 21 20 #define cpu_has_fpu 0 22 21 #define cpu_has_32fpr 0
-1
arch/mips/include/asm/mach-au1x00/cpu-feature-overrides.h
··· 21 21 #define cpu_has_4kex 1 22 22 #define cpu_has_3k_cache 0 23 23 #define cpu_has_4k_cache 1 24 - #define cpu_has_tx39_cache 0 25 24 #define cpu_has_fpu 0 26 25 #define cpu_has_32fpr 0 27 26 #define cpu_has_counter 1
-1
arch/mips/include/asm/mach-bcm47xx/cpu-feature-overrides.h
··· 6 6 #define cpu_has_4kex 1 7 7 #define cpu_has_3k_cache 0 8 8 #define cpu_has_4k_cache 1 9 - #define cpu_has_tx39_cache 0 10 9 #define cpu_has_fpu 0 11 10 #define cpu_has_32fpr 0 12 11 #define cpu_has_counter 1
-1
arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h
··· 21 21 #define cpu_has_4kex 1 22 22 #define cpu_has_3k_cache 0 23 23 #define cpu_has_4k_cache 0 24 - #define cpu_has_tx39_cache 0 25 24 #define cpu_has_counter 1 26 25 #define cpu_has_watch 1 27 26 #define cpu_has_divec 1
-1
arch/mips/include/asm/mach-cobalt/cpu-feature-overrides.h
··· 13 13 #define cpu_has_4kex 1 14 14 #define cpu_has_3k_cache 0 15 15 #define cpu_has_4k_cache 1 16 - #define cpu_has_tx39_cache 0 17 16 #define cpu_has_32fpr 1 18 17 #define cpu_has_counter 1 19 18 #define cpu_has_watch 0
-1
arch/mips/include/asm/mach-dec/cpu-feature-overrides.h
··· 17 17 #define cpu_has_rixiex 0 18 18 #define cpu_has_maar 0 19 19 #define cpu_has_rw_llb 0 20 - #define cpu_has_tx39_cache 0 21 20 #define cpu_has_divec 0 22 21 #define cpu_has_prefetch 0 23 22 #define cpu_has_mcheck 0
-1
arch/mips/include/asm/mach-ingenic/cpu-feature-overrides.h
··· 11 11 #define cpu_has_4kex 1 12 12 #define cpu_has_3k_cache 0 13 13 #define cpu_has_4k_cache 1 14 - #define cpu_has_tx39_cache 0 15 14 #define cpu_has_counter 0 16 15 #define cpu_has_watch 1 17 16 #define cpu_has_divec 1
-1
arch/mips/include/asm/mach-ip27/cpu-feature-overrides.h
··· 25 25 #define cpu_has_4kex 1 26 26 #define cpu_has_3k_cache 0 27 27 #define cpu_has_4k_cache 1 28 - #define cpu_has_tx39_cache 0 29 28 #define cpu_has_fpu 1 30 29 #define cpu_has_nofpuex 0 31 30 #define cpu_has_32fpr 1
-1
arch/mips/include/asm/mach-ip30/cpu-feature-overrides.h
··· 28 28 #define cpu_has_4kex 1 29 29 #define cpu_has_3k_cache 0 30 30 #define cpu_has_4k_cache 1 31 - #define cpu_has_tx39_cache 0 32 31 #define cpu_has_fpu 1 33 32 #define cpu_has_nofpuex 0 34 33 #define cpu_has_32fpr 1
-1
arch/mips/include/asm/mach-lantiq/falcon/cpu-feature-overrides.h
··· 15 15 #define cpu_has_4kex 1 16 16 #define cpu_has_3k_cache 0 17 17 #define cpu_has_4k_cache 1 18 - #define cpu_has_tx39_cache 0 19 18 #define cpu_has_sb1_cache 0 20 19 #define cpu_has_fpu 0 21 20 #define cpu_has_32fpr 0
-1
arch/mips/include/asm/mach-loongson2ef/cpu-feature-overrides.h
··· 34 34 #define cpu_has_mipsmt 0 35 35 #define cpu_has_smartmips 0 36 36 #define cpu_has_tlb 1 37 - #define cpu_has_tx39_cache 0 38 37 #define cpu_has_vce 0 39 38 #define cpu_has_veic 0 40 39 #define cpu_has_vint 0
-1
arch/mips/include/asm/mach-loongson64/cpu-feature-overrides.h
··· 36 36 #define cpu_has_mipsmt 0 37 37 #define cpu_has_smartmips 0 38 38 #define cpu_has_tlb 1 39 - #define cpu_has_tx39_cache 0 40 39 #define cpu_has_vce 0 41 40 #define cpu_has_veic 0 42 41 #define cpu_has_vint 0
-1
arch/mips/include/asm/mach-ralink/mt7620/cpu-feature-overrides.h
··· 16 16 #define cpu_has_4kex 1 17 17 #define cpu_has_3k_cache 0 18 18 #define cpu_has_4k_cache 1 19 - #define cpu_has_tx39_cache 0 20 19 #define cpu_has_sb1_cache 0 21 20 #define cpu_has_fpu 0 22 21 #define cpu_has_32fpr 0
-1
arch/mips/include/asm/mach-ralink/mt7621/cpu-feature-overrides.h
··· 17 17 #define cpu_has_4kex 1 18 18 #define cpu_has_3k_cache 0 19 19 #define cpu_has_4k_cache 1 20 - #define cpu_has_tx39_cache 0 21 20 #define cpu_has_sb1_cache 0 22 21 #define cpu_has_fpu 0 23 22 #define cpu_has_32fpr 0
-1
arch/mips/include/asm/mach-ralink/rt288x/cpu-feature-overrides.h
··· 16 16 #define cpu_has_4kex 1 17 17 #define cpu_has_3k_cache 0 18 18 #define cpu_has_4k_cache 1 19 - #define cpu_has_tx39_cache 0 20 19 #define cpu_has_sb1_cache 0 21 20 #define cpu_has_fpu 0 22 21 #define cpu_has_32fpr 0
-1
arch/mips/include/asm/mach-ralink/rt305x/cpu-feature-overrides.h
··· 16 16 #define cpu_has_4kex 1 17 17 #define cpu_has_3k_cache 0 18 18 #define cpu_has_4k_cache 1 19 - #define cpu_has_tx39_cache 0 20 19 #define cpu_has_sb1_cache 0 21 20 #define cpu_has_fpu 0 22 21 #define cpu_has_32fpr 0
-1
arch/mips/include/asm/mach-ralink/rt3883/cpu-feature-overrides.h
··· 15 15 #define cpu_has_4kex 1 16 16 #define cpu_has_3k_cache 0 17 17 #define cpu_has_4k_cache 1 18 - #define cpu_has_tx39_cache 0 19 18 #define cpu_has_sb1_cache 0 20 19 #define cpu_has_fpu 0 21 20 #define cpu_has_32fpr 0
-1
arch/mips/include/asm/mach-rc32434/cpu-feature-overrides.h
··· 18 18 #define cpu_has_4kex 1 19 19 #define cpu_has_3k_cache 0 20 20 #define cpu_has_4k_cache 1 21 - #define cpu_has_tx39_cache 0 22 21 #define cpu_has_sb1_cache 0 23 22 #define cpu_has_fpu 0 24 23 #define cpu_has_32fpr 0
-25
arch/mips/include/asm/mach-tx39xx/ioremap.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 - /* 3 - * include/asm-mips/mach-tx39xx/ioremap.h 4 - */ 5 - #ifndef __ASM_MACH_TX39XX_IOREMAP_H 6 - #define __ASM_MACH_TX39XX_IOREMAP_H 7 - 8 - #include <linux/types.h> 9 - 10 - static inline void __iomem *plat_ioremap(phys_addr_t offset, unsigned long size, 11 - unsigned long flags) 12 - { 13 - #define TXX9_DIRECTMAP_BASE 0xff000000ul 14 - if (offset >= TXX9_DIRECTMAP_BASE && 15 - offset < TXX9_DIRECTMAP_BASE + 0xff0000) 16 - return (void __iomem *)offset; 17 - return NULL; 18 - } 19 - 20 - static inline int plat_iounmap(const volatile void __iomem *addr) 21 - { 22 - return (unsigned long)addr >= TXX9_DIRECTMAP_BASE; 23 - } 24 - 25 - #endif /* __ASM_MACH_TX39XX_IOREMAP_H */
-24
arch/mips/include/asm/mach-tx39xx/mangle-port.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef __ASM_MACH_TX39XX_MANGLE_PORT_H 3 - #define __ASM_MACH_TX39XX_MANGLE_PORT_H 4 - 5 - #if defined(CONFIG_TOSHIBA_JMR3927) 6 - extern unsigned long (*__swizzle_addr_b)(unsigned long port); 7 - #define NEEDS_TXX9_SWIZZLE_ADDR_B 8 - #else 9 - #define __swizzle_addr_b(port) (port) 10 - #endif 11 - #define __swizzle_addr_w(port) (port) 12 - #define __swizzle_addr_l(port) (port) 13 - #define __swizzle_addr_q(port) (port) 14 - 15 - #define ioswabb(a, x) (x) 16 - #define __mem_ioswabb(a, x) (x) 17 - #define ioswabw(a, x) le16_to_cpu((__force __le16)(x)) 18 - #define __mem_ioswabw(a, x) (x) 19 - #define ioswabl(a, x) le32_to_cpu((__force __le32)(x)) 20 - #define __mem_ioswabl(a, x) (x) 21 - #define ioswabq(a, x) le64_to_cpu((__force __le64)(x)) 22 - #define __mem_ioswabq(a, x) (x) 23 - 24 - #endif /* __ASM_MACH_TX39XX_MANGLE_PORT_H */
-17
arch/mips/include/asm/mach-tx39xx/spaces.h
··· 1 - /* 2 - * This file is subject to the terms and conditions of the GNU General Public 3 - * License. See the file "COPYING" in the main directory of this archive 4 - * for more details. 5 - * 6 - * Copyright (C) 1994 - 1999, 2000, 03, 04 Ralf Baechle 7 - * Copyright (C) 2000, 2002 Maciej W. Rozycki 8 - * Copyright (C) 1990, 1999, 2000 Silicon Graphics, Inc. 9 - */ 10 - #ifndef _ASM_TX39XX_SPACES_H 11 - #define _ASM_TX39XX_SPACES_H 12 - 13 - #define FIXADDR_TOP ((unsigned long)(long)(int)0xfefe0000) 14 - 15 - #include <asm/mach-generic/spaces.h> 16 - 17 - #endif /* __ASM_TX39XX_SPACES_H */
+3 -3
arch/mips/include/asm/stackframe.h
··· 42 42 cfi_restore \reg \offset \docfi 43 43 .endm 44 44 45 - #if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX) 45 + #if defined(CONFIG_CPU_R3000) 46 46 #define STATMASK 0x3f 47 47 #else 48 48 #define STATMASK 0x1f ··· 349 349 cfi_ld sp, PT_R29, \docfi 350 350 .endm 351 351 352 - #if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX) 352 + #if defined(CONFIG_CPU_R3000) 353 353 354 354 .macro RESTORE_SOME docfi=0 355 355 .set push ··· 478 478 .macro KMODE 479 479 mfc0 t0, CP0_STATUS 480 480 li t1, ST0_KERNEL_CUMASK | (STATMASK & ~1) 481 - #if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX) 481 + #if defined(CONFIG_CPU_R3000) 482 482 andi t2, t0, ST0_IEP 483 483 srl t2, 2 484 484 or t0, t2
-3
arch/mips/include/asm/txx9/boards.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifdef CONFIG_TOSHIBA_JMR3927 3 - BOARD_VEC(jmr3927_vec) 4 - #endif 5 2 #ifdef CONFIG_TOSHIBA_RBTX4927 6 3 BOARD_VEC(rbtx4927_vec) 7 4 BOARD_VEC(rbtx4937_vec)
-179
arch/mips/include/asm/txx9/jmr3927.h
··· 1 - /* 2 - * Defines for the TJSYS JMR-TX3927 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 - * Copyright (C) 2000-2001 Toshiba Corporation 9 - */ 10 - #ifndef __ASM_TXX9_JMR3927_H 11 - #define __ASM_TXX9_JMR3927_H 12 - 13 - #include <asm/txx9/tx3927.h> 14 - #include <asm/addrspace.h> 15 - #include <asm/txx9irq.h> 16 - 17 - /* CS */ 18 - #define JMR3927_ROMCE0 0x1fc00000 /* 4M */ 19 - #define JMR3927_ROMCE1 0x1e000000 /* 4M */ 20 - #define JMR3927_ROMCE2 0x14000000 /* 16M */ 21 - #define JMR3927_ROMCE3 0x10000000 /* 64M */ 22 - #define JMR3927_ROMCE5 0x1d000000 /* 4M */ 23 - #define JMR3927_SDCS0 0x00000000 /* 32M */ 24 - #define JMR3927_SDCS1 0x02000000 /* 32M */ 25 - /* PCI Direct Mappings */ 26 - 27 - #define JMR3927_PCIMEM 0x08000000 28 - #define JMR3927_PCIMEM_SIZE 0x08000000 /* 128M */ 29 - #define JMR3927_PCIIO 0x15000000 30 - #define JMR3927_PCIIO_SIZE 0x01000000 /* 16M */ 31 - 32 - #define JMR3927_SDRAM_SIZE 0x02000000 /* 32M */ 33 - #define JMR3927_PORT_BASE KSEG1 34 - 35 - /* Address map (virtual address) */ 36 - #define JMR3927_ROM0_BASE (KSEG1 + JMR3927_ROMCE0) 37 - #define JMR3927_ROM1_BASE (KSEG1 + JMR3927_ROMCE1) 38 - #define JMR3927_IOC_BASE (KSEG1 + JMR3927_ROMCE2) 39 - #define JMR3927_PCIMEM_BASE (KSEG1 + JMR3927_PCIMEM) 40 - #define JMR3927_PCIIO_BASE (KSEG1 + JMR3927_PCIIO) 41 - 42 - #define JMR3927_IOC_REV_ADDR (JMR3927_IOC_BASE + 0x00000000) 43 - #define JMR3927_IOC_NVRAMB_ADDR (JMR3927_IOC_BASE + 0x00010000) 44 - #define JMR3927_IOC_LED_ADDR (JMR3927_IOC_BASE + 0x00020000) 45 - #define JMR3927_IOC_DIPSW_ADDR (JMR3927_IOC_BASE + 0x00030000) 46 - #define JMR3927_IOC_BREV_ADDR (JMR3927_IOC_BASE + 0x00040000) 47 - #define JMR3927_IOC_DTR_ADDR (JMR3927_IOC_BASE + 0x00050000) 48 - #define JMR3927_IOC_INTS1_ADDR (JMR3927_IOC_BASE + 0x00080000) 49 - #define JMR3927_IOC_INTS2_ADDR (JMR3927_IOC_BASE + 0x00090000) 50 - #define JMR3927_IOC_INTM_ADDR (JMR3927_IOC_BASE + 0x000a0000) 51 - #define JMR3927_IOC_INTP_ADDR (JMR3927_IOC_BASE + 0x000b0000) 52 - #define JMR3927_IOC_RESET_ADDR (JMR3927_IOC_BASE + 0x000f0000) 53 - 54 - /* Flash ROM */ 55 - #define JMR3927_FLASH_BASE (JMR3927_ROM0_BASE) 56 - #define JMR3927_FLASH_SIZE 0x00400000 57 - 58 - /* bits for IOC_REV/IOC_BREV (high byte) */ 59 - #define JMR3927_IDT_MASK 0xfc 60 - #define JMR3927_REV_MASK 0x03 61 - #define JMR3927_IOC_IDT 0xe0 62 - 63 - /* bits for IOC_INTS1/IOC_INTS2/IOC_INTM/IOC_INTP (high byte) */ 64 - #define JMR3927_IOC_INTB_PCIA 0 65 - #define JMR3927_IOC_INTB_PCIB 1 66 - #define JMR3927_IOC_INTB_PCIC 2 67 - #define JMR3927_IOC_INTB_PCID 3 68 - #define JMR3927_IOC_INTB_MODEM 4 69 - #define JMR3927_IOC_INTB_INT6 5 70 - #define JMR3927_IOC_INTB_INT7 6 71 - #define JMR3927_IOC_INTB_SOFT 7 72 - #define JMR3927_IOC_INTF_PCIA (1 << JMR3927_IOC_INTF_PCIA) 73 - #define JMR3927_IOC_INTF_PCIB (1 << JMR3927_IOC_INTB_PCIB) 74 - #define JMR3927_IOC_INTF_PCIC (1 << JMR3927_IOC_INTB_PCIC) 75 - #define JMR3927_IOC_INTF_PCID (1 << JMR3927_IOC_INTB_PCID) 76 - #define JMR3927_IOC_INTF_MODEM (1 << JMR3927_IOC_INTB_MODEM) 77 - #define JMR3927_IOC_INTF_INT6 (1 << JMR3927_IOC_INTB_INT6) 78 - #define JMR3927_IOC_INTF_INT7 (1 << JMR3927_IOC_INTB_INT7) 79 - #define JMR3927_IOC_INTF_SOFT (1 << JMR3927_IOC_INTB_SOFT) 80 - 81 - /* bits for IOC_RESET (high byte) */ 82 - #define JMR3927_IOC_RESET_CPU 1 83 - #define JMR3927_IOC_RESET_PCI 2 84 - 85 - #if defined(__BIG_ENDIAN) 86 - #define jmr3927_ioc_reg_out(d, a) ((*(volatile unsigned char *)(a)) = (d)) 87 - #define jmr3927_ioc_reg_in(a) (*(volatile unsigned char *)(a)) 88 - #elif defined(__LITTLE_ENDIAN) 89 - #define jmr3927_ioc_reg_out(d, a) ((*(volatile unsigned char *)((a)^1)) = (d)) 90 - #define jmr3927_ioc_reg_in(a) (*(volatile unsigned char *)((a)^1)) 91 - #else 92 - #error "No Endian" 93 - #endif 94 - 95 - /* LED macro */ 96 - #define jmr3927_led_set(n/*0-16*/) jmr3927_ioc_reg_out(~(n), JMR3927_IOC_LED_ADDR) 97 - 98 - #define jmr3927_led_and_set(n/*0-16*/) jmr3927_ioc_reg_out((~(n)) & jmr3927_ioc_reg_in(JMR3927_IOC_LED_ADDR), JMR3927_IOC_LED_ADDR) 99 - 100 - /* DIPSW4 macro */ 101 - #define jmr3927_dipsw1() (gpio_get_value(11) == 0) 102 - #define jmr3927_dipsw2() (gpio_get_value(10) == 0) 103 - #define jmr3927_dipsw3() ((jmr3927_ioc_reg_in(JMR3927_IOC_DIPSW_ADDR) & 2) == 0) 104 - #define jmr3927_dipsw4() ((jmr3927_ioc_reg_in(JMR3927_IOC_DIPSW_ADDR) & 1) == 0) 105 - 106 - /* 107 - * IRQ mappings 108 - */ 109 - 110 - /* These are the virtual IRQ numbers, we divide all IRQ's into 111 - * 'spaces', the 'space' determines where and how to enable/disable 112 - * that particular IRQ on an JMR machine. Add new 'spaces' as new 113 - * IRQ hardware is supported. 114 - */ 115 - #define JMR3927_NR_IRQ_IRC 16 /* On-Chip IRC */ 116 - #define JMR3927_NR_IRQ_IOC 8 /* PCI/MODEM/INT[6:7] */ 117 - 118 - #define JMR3927_IRQ_IRC TXX9_IRQ_BASE 119 - #define JMR3927_IRQ_IOC (JMR3927_IRQ_IRC + JMR3927_NR_IRQ_IRC) 120 - #define JMR3927_IRQ_END (JMR3927_IRQ_IOC + JMR3927_NR_IRQ_IOC) 121 - 122 - #define JMR3927_IRQ_IRC_INT0 (JMR3927_IRQ_IRC + TX3927_IR_INT0) 123 - #define JMR3927_IRQ_IRC_INT1 (JMR3927_IRQ_IRC + TX3927_IR_INT1) 124 - #define JMR3927_IRQ_IRC_INT2 (JMR3927_IRQ_IRC + TX3927_IR_INT2) 125 - #define JMR3927_IRQ_IRC_INT3 (JMR3927_IRQ_IRC + TX3927_IR_INT3) 126 - #define JMR3927_IRQ_IRC_INT4 (JMR3927_IRQ_IRC + TX3927_IR_INT4) 127 - #define JMR3927_IRQ_IRC_INT5 (JMR3927_IRQ_IRC + TX3927_IR_INT5) 128 - #define JMR3927_IRQ_IRC_SIO0 (JMR3927_IRQ_IRC + TX3927_IR_SIO0) 129 - #define JMR3927_IRQ_IRC_SIO1 (JMR3927_IRQ_IRC + TX3927_IR_SIO1) 130 - #define JMR3927_IRQ_IRC_SIO(ch) (JMR3927_IRQ_IRC + TX3927_IR_SIO(ch)) 131 - #define JMR3927_IRQ_IRC_DMA (JMR3927_IRQ_IRC + TX3927_IR_DMA) 132 - #define JMR3927_IRQ_IRC_PIO (JMR3927_IRQ_IRC + TX3927_IR_PIO) 133 - #define JMR3927_IRQ_IRC_PCI (JMR3927_IRQ_IRC + TX3927_IR_PCI) 134 - #define JMR3927_IRQ_IRC_TMR(ch) (JMR3927_IRQ_IRC + TX3927_IR_TMR(ch)) 135 - #define JMR3927_IRQ_IOC_PCIA (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIA) 136 - #define JMR3927_IRQ_IOC_PCIB (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIB) 137 - #define JMR3927_IRQ_IOC_PCIC (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIC) 138 - #define JMR3927_IRQ_IOC_PCID (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCID) 139 - #define JMR3927_IRQ_IOC_MODEM (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_MODEM) 140 - #define JMR3927_IRQ_IOC_INT6 (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_INT6) 141 - #define JMR3927_IRQ_IOC_INT7 (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_INT7) 142 - #define JMR3927_IRQ_IOC_SOFT (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_SOFT) 143 - 144 - /* IOC (PCI, MODEM) */ 145 - #define JMR3927_IRQ_IOCINT JMR3927_IRQ_IRC_INT1 146 - /* TC35815 100M Ether (JMR-TX3912:JPW4:2-3 Short) */ 147 - #define JMR3927_IRQ_ETHER0 JMR3927_IRQ_IRC_INT3 148 - 149 - /* Clocks */ 150 - #define JMR3927_CORECLK 132710400 /* 132.7MHz */ 151 - 152 - /* 153 - * TX3927 Pin Configuration: 154 - * 155 - * PCFG bits Avail Dead 156 - * SELSIO[1:0]:11 RXD[1:0], TXD[1:0] PIO[6:3] 157 - * SELSIOC[0]:1 CTS[0], RTS[0] INT[5:4] 158 - * SELSIOC[1]:0,SELDSF:0, GSDAO[0],GPCST[3] CTS[1], RTS[1],DSF, 159 - * GDBGE* PIO[2:1] 160 - * SELDMA[2]:1 DMAREQ[2],DMAACK[2] PIO[13:12] 161 - * SELTMR[2:0]:000 TIMER[1:0] 162 - * SELCS:0,SELDMA[1]:0 PIO[11;10] SDCS_CE[7:6], 163 - * DMAREQ[1],DMAACK[1] 164 - * SELDMA[0]:1 DMAREQ[0],DMAACK[0] PIO[9:8] 165 - * SELDMA[3]:1 DMAREQ[3],DMAACK[3] PIO[15:14] 166 - * SELDONE:1 DMADONE PIO[7] 167 - * 168 - * Usable pins are: 169 - * RXD[1;0],TXD[1:0],CTS[0],RTS[0], 170 - * DMAREQ[0,2,3],DMAACK[0,2,3],DMADONE,PIO[0,10,11] 171 - * INT[3:0] 172 - */ 173 - 174 - void jmr3927_prom_init(void); 175 - void jmr3927_irq_setup(void); 176 - struct pci_dev; 177 - int jmr3927_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin); 178 - 179 - #endif /* __ASM_TXX9_JMR3927_H */
-341
arch/mips/include/asm/txx9/tx3927.h
··· 1 - /* 2 - * This file is subject to the terms and conditions of the GNU General Public 3 - * License. See the file "COPYING" in the main directory of this archive 4 - * for more details. 5 - * 6 - * Copyright (C) 2000 Toshiba Corporation 7 - */ 8 - #ifndef __ASM_TXX9_TX3927_H 9 - #define __ASM_TXX9_TX3927_H 10 - 11 - #define TX3927_REG_BASE 0xfffe0000UL 12 - #define TX3927_REG_SIZE 0x00010000 13 - #define TX3927_SDRAMC_REG (TX3927_REG_BASE + 0x8000) 14 - #define TX3927_ROMC_REG (TX3927_REG_BASE + 0x9000) 15 - #define TX3927_DMA_REG (TX3927_REG_BASE + 0xb000) 16 - #define TX3927_IRC_REG (TX3927_REG_BASE + 0xc000) 17 - #define TX3927_PCIC_REG (TX3927_REG_BASE + 0xd000) 18 - #define TX3927_CCFG_REG (TX3927_REG_BASE + 0xe000) 19 - #define TX3927_NR_TMR 3 20 - #define TX3927_TMR_REG(ch) (TX3927_REG_BASE + 0xf000 + (ch) * 0x100) 21 - #define TX3927_NR_SIO 2 22 - #define TX3927_SIO_REG(ch) (TX3927_REG_BASE + 0xf300 + (ch) * 0x100) 23 - #define TX3927_PIO_REG (TX3927_REG_BASE + 0xf500) 24 - 25 - struct tx3927_sdramc_reg { 26 - volatile unsigned long cr[8]; 27 - volatile unsigned long tr[3]; 28 - volatile unsigned long cmd; 29 - volatile unsigned long smrs[2]; 30 - }; 31 - 32 - struct tx3927_romc_reg { 33 - volatile unsigned long cr[8]; 34 - }; 35 - 36 - struct tx3927_dma_reg { 37 - struct tx3927_dma_ch_reg { 38 - volatile unsigned long cha; 39 - volatile unsigned long sar; 40 - volatile unsigned long dar; 41 - volatile unsigned long cntr; 42 - volatile unsigned long sair; 43 - volatile unsigned long dair; 44 - volatile unsigned long ccr; 45 - volatile unsigned long csr; 46 - } ch[4]; 47 - volatile unsigned long dbr[8]; 48 - volatile unsigned long tdhr; 49 - volatile unsigned long mcr; 50 - volatile unsigned long unused0; 51 - }; 52 - 53 - #include <asm/byteorder.h> 54 - 55 - #ifdef __BIG_ENDIAN 56 - #define endian_def_s2(e1, e2) \ 57 - volatile unsigned short e1, e2 58 - #define endian_def_sb2(e1, e2, e3) \ 59 - volatile unsigned short e1;volatile unsigned char e2, e3 60 - #define endian_def_b2s(e1, e2, e3) \ 61 - volatile unsigned char e1, e2;volatile unsigned short e3 62 - #define endian_def_b4(e1, e2, e3, e4) \ 63 - volatile unsigned char e1, e2, e3, e4 64 - #else 65 - #define endian_def_s2(e1, e2) \ 66 - volatile unsigned short e2, e1 67 - #define endian_def_sb2(e1, e2, e3) \ 68 - volatile unsigned char e3, e2;volatile unsigned short e1 69 - #define endian_def_b2s(e1, e2, e3) \ 70 - volatile unsigned short e3;volatile unsigned char e2, e1 71 - #define endian_def_b4(e1, e2, e3, e4) \ 72 - volatile unsigned char e4, e3, e2, e1 73 - #endif 74 - 75 - struct tx3927_pcic_reg { 76 - endian_def_s2(did, vid); 77 - endian_def_s2(pcistat, pcicmd); 78 - endian_def_b4(cc, scc, rpli, rid); 79 - endian_def_b4(unused0, ht, mlt, cls); 80 - volatile unsigned long ioba; /* +10 */ 81 - volatile unsigned long mba; 82 - volatile unsigned long unused1[5]; 83 - endian_def_s2(svid, ssvid); 84 - volatile unsigned long unused2; /* +30 */ 85 - endian_def_sb2(unused3, unused4, capptr); 86 - volatile unsigned long unused5; 87 - endian_def_b4(ml, mg, ip, il); 88 - volatile unsigned long unused6; /* +40 */ 89 - volatile unsigned long istat; 90 - volatile unsigned long iim; 91 - volatile unsigned long rrt; 92 - volatile unsigned long unused7[3]; /* +50 */ 93 - volatile unsigned long ipbmma; 94 - volatile unsigned long ipbioma; /* +60 */ 95 - volatile unsigned long ilbmma; 96 - volatile unsigned long ilbioma; 97 - volatile unsigned long unused8[9]; 98 - volatile unsigned long tc; /* +90 */ 99 - volatile unsigned long tstat; 100 - volatile unsigned long tim; 101 - volatile unsigned long tccmd; 102 - volatile unsigned long pcirrt; /* +a0 */ 103 - volatile unsigned long pcirrt_cmd; 104 - volatile unsigned long pcirrdt; 105 - volatile unsigned long unused9[3]; 106 - volatile unsigned long tlboap; 107 - volatile unsigned long tlbiap; 108 - volatile unsigned long tlbmma; /* +c0 */ 109 - volatile unsigned long tlbioma; 110 - volatile unsigned long sc_msg; 111 - volatile unsigned long sc_be; 112 - volatile unsigned long tbl; /* +d0 */ 113 - volatile unsigned long unused10[3]; 114 - volatile unsigned long pwmng; /* +e0 */ 115 - volatile unsigned long pwmngs; 116 - volatile unsigned long unused11[6]; 117 - volatile unsigned long req_trace; /* +100 */ 118 - volatile unsigned long pbapmc; 119 - volatile unsigned long pbapms; 120 - volatile unsigned long pbapmim; 121 - volatile unsigned long bm; /* +110 */ 122 - volatile unsigned long cpcibrs; 123 - volatile unsigned long cpcibgs; 124 - volatile unsigned long pbacs; 125 - volatile unsigned long iobas; /* +120 */ 126 - volatile unsigned long mbas; 127 - volatile unsigned long lbc; 128 - volatile unsigned long lbstat; 129 - volatile unsigned long lbim; /* +130 */ 130 - volatile unsigned long pcistatim; 131 - volatile unsigned long ica; 132 - volatile unsigned long icd; 133 - volatile unsigned long iiadp; /* +140 */ 134 - volatile unsigned long iscdp; 135 - volatile unsigned long mmas; 136 - volatile unsigned long iomas; 137 - volatile unsigned long ipciaddr; /* +150 */ 138 - volatile unsigned long ipcidata; 139 - volatile unsigned long ipcibe; 140 - }; 141 - 142 - struct tx3927_ccfg_reg { 143 - volatile unsigned long ccfg; 144 - volatile unsigned long crir; 145 - volatile unsigned long pcfg; 146 - volatile unsigned long tear; 147 - volatile unsigned long pdcr; 148 - }; 149 - 150 - /* 151 - * SDRAMC 152 - */ 153 - 154 - /* 155 - * ROMC 156 - */ 157 - 158 - /* 159 - * DMA 160 - */ 161 - /* bits for MCR */ 162 - #define TX3927_DMA_MCR_EIS(ch) (0x10000000<<(ch)) 163 - #define TX3927_DMA_MCR_DIS(ch) (0x01000000<<(ch)) 164 - #define TX3927_DMA_MCR_RSFIF 0x00000080 165 - #define TX3927_DMA_MCR_FIFUM(ch) (0x00000008<<(ch)) 166 - #define TX3927_DMA_MCR_LE 0x00000004 167 - #define TX3927_DMA_MCR_RPRT 0x00000002 168 - #define TX3927_DMA_MCR_MSTEN 0x00000001 169 - 170 - /* bits for CCRn */ 171 - #define TX3927_DMA_CCR_DBINH 0x04000000 172 - #define TX3927_DMA_CCR_SBINH 0x02000000 173 - #define TX3927_DMA_CCR_CHRST 0x01000000 174 - #define TX3927_DMA_CCR_RVBYTE 0x00800000 175 - #define TX3927_DMA_CCR_ACKPOL 0x00400000 176 - #define TX3927_DMA_CCR_REQPL 0x00200000 177 - #define TX3927_DMA_CCR_EGREQ 0x00100000 178 - #define TX3927_DMA_CCR_CHDN 0x00080000 179 - #define TX3927_DMA_CCR_DNCTL 0x00060000 180 - #define TX3927_DMA_CCR_EXTRQ 0x00010000 181 - #define TX3927_DMA_CCR_INTRQD 0x0000e000 182 - #define TX3927_DMA_CCR_INTENE 0x00001000 183 - #define TX3927_DMA_CCR_INTENC 0x00000800 184 - #define TX3927_DMA_CCR_INTENT 0x00000400 185 - #define TX3927_DMA_CCR_CHNEN 0x00000200 186 - #define TX3927_DMA_CCR_XFACT 0x00000100 187 - #define TX3927_DMA_CCR_SNOP 0x00000080 188 - #define TX3927_DMA_CCR_DSTINC 0x00000040 189 - #define TX3927_DMA_CCR_SRCINC 0x00000020 190 - #define TX3927_DMA_CCR_XFSZ(order) (((order) << 2) & 0x0000001c) 191 - #define TX3927_DMA_CCR_XFSZ_1W TX3927_DMA_CCR_XFSZ(2) 192 - #define TX3927_DMA_CCR_XFSZ_4W TX3927_DMA_CCR_XFSZ(4) 193 - #define TX3927_DMA_CCR_XFSZ_8W TX3927_DMA_CCR_XFSZ(5) 194 - #define TX3927_DMA_CCR_XFSZ_16W TX3927_DMA_CCR_XFSZ(6) 195 - #define TX3927_DMA_CCR_XFSZ_32W TX3927_DMA_CCR_XFSZ(7) 196 - #define TX3927_DMA_CCR_MEMIO 0x00000002 197 - #define TX3927_DMA_CCR_ONEAD 0x00000001 198 - 199 - /* bits for CSRn */ 200 - #define TX3927_DMA_CSR_CHNACT 0x00000100 201 - #define TX3927_DMA_CSR_ABCHC 0x00000080 202 - #define TX3927_DMA_CSR_NCHNC 0x00000040 203 - #define TX3927_DMA_CSR_NTRNFC 0x00000020 204 - #define TX3927_DMA_CSR_EXTDN 0x00000010 205 - #define TX3927_DMA_CSR_CFERR 0x00000008 206 - #define TX3927_DMA_CSR_CHERR 0x00000004 207 - #define TX3927_DMA_CSR_DESERR 0x00000002 208 - #define TX3927_DMA_CSR_SORERR 0x00000001 209 - 210 - /* 211 - * IRC 212 - */ 213 - #define TX3927_IR_INT0 0 214 - #define TX3927_IR_INT1 1 215 - #define TX3927_IR_INT2 2 216 - #define TX3927_IR_INT3 3 217 - #define TX3927_IR_INT4 4 218 - #define TX3927_IR_INT5 5 219 - #define TX3927_IR_SIO0 6 220 - #define TX3927_IR_SIO1 7 221 - #define TX3927_IR_SIO(ch) (6 + (ch)) 222 - #define TX3927_IR_DMA 8 223 - #define TX3927_IR_PIO 9 224 - #define TX3927_IR_PCI 10 225 - #define TX3927_IR_TMR(ch) (13 + (ch)) 226 - #define TX3927_NUM_IR 16 227 - 228 - /* 229 - * PCIC 230 - */ 231 - /* bits for PCICMD */ 232 - /* see PCI_COMMAND_XXX in linux/pci.h */ 233 - 234 - /* bits for PCISTAT */ 235 - /* see PCI_STATUS_XXX in linux/pci.h */ 236 - #define PCI_STATUS_NEW_CAP 0x0010 237 - 238 - /* bits for ISTAT/IIM */ 239 - #define TX3927_PCIC_IIM_ALL 0x00001600 240 - 241 - /* bits for TC */ 242 - #define TX3927_PCIC_TC_OF16E 0x00000020 243 - #define TX3927_PCIC_TC_IF8E 0x00000010 244 - #define TX3927_PCIC_TC_OF8E 0x00000008 245 - 246 - /* bits for TSTAT/TIM */ 247 - #define TX3927_PCIC_TIM_ALL 0x0003ffff 248 - 249 - /* bits for IOBA/MBA */ 250 - /* see PCI_BASE_ADDRESS_XXX in linux/pci.h */ 251 - 252 - /* bits for PBAPMC */ 253 - #define TX3927_PCIC_PBAPMC_RPBA 0x00000004 254 - #define TX3927_PCIC_PBAPMC_PBAEN 0x00000002 255 - #define TX3927_PCIC_PBAPMC_BMCEN 0x00000001 256 - 257 - /* bits for LBSTAT/LBIM */ 258 - #define TX3927_PCIC_LBIM_ALL 0x0000003e 259 - 260 - /* bits for PCISTATIM (see also PCI_STATUS_XXX in linux/pci.h */ 261 - #define TX3927_PCIC_PCISTATIM_ALL 0x0000f900 262 - 263 - /* bits for LBC */ 264 - #define TX3927_PCIC_LBC_IBSE 0x00004000 265 - #define TX3927_PCIC_LBC_TIBSE 0x00002000 266 - #define TX3927_PCIC_LBC_TMFBSE 0x00001000 267 - #define TX3927_PCIC_LBC_HRST 0x00000800 268 - #define TX3927_PCIC_LBC_SRST 0x00000400 269 - #define TX3927_PCIC_LBC_EPCAD 0x00000200 270 - #define TX3927_PCIC_LBC_MSDSE 0x00000100 271 - #define TX3927_PCIC_LBC_CRR 0x00000080 272 - #define TX3927_PCIC_LBC_ILMDE 0x00000040 273 - #define TX3927_PCIC_LBC_ILIDE 0x00000020 274 - 275 - #define TX3927_PCIC_IDSEL_AD_TO_SLOT(ad) ((ad) - 11) 276 - #define TX3927_PCIC_MAX_DEVNU TX3927_PCIC_IDSEL_AD_TO_SLOT(32) 277 - 278 - /* 279 - * CCFG 280 - */ 281 - /* CCFG : Chip Configuration */ 282 - #define TX3927_CCFG_TLBOFF 0x00020000 283 - #define TX3927_CCFG_BEOW 0x00010000 284 - #define TX3927_CCFG_WR 0x00008000 285 - #define TX3927_CCFG_TOE 0x00004000 286 - #define TX3927_CCFG_PCIXARB 0x00002000 287 - #define TX3927_CCFG_PCI3 0x00001000 288 - #define TX3927_CCFG_PSNP 0x00000800 289 - #define TX3927_CCFG_PPRI 0x00000400 290 - #define TX3927_CCFG_PLLM 0x00000030 291 - #define TX3927_CCFG_ENDIAN 0x00000004 292 - #define TX3927_CCFG_HALT 0x00000002 293 - #define TX3927_CCFG_ACEHOLD 0x00000001 294 - 295 - /* PCFG : Pin Configuration */ 296 - #define TX3927_PCFG_SYSCLKEN 0x08000000 297 - #define TX3927_PCFG_SDRCLKEN_ALL 0x07c00000 298 - #define TX3927_PCFG_SDRCLKEN(ch) (0x00400000<<(ch)) 299 - #define TX3927_PCFG_PCICLKEN_ALL 0x003c0000 300 - #define TX3927_PCFG_PCICLKEN(ch) (0x00040000<<(ch)) 301 - #define TX3927_PCFG_SELALL 0x0003ffff 302 - #define TX3927_PCFG_SELCS 0x00020000 303 - #define TX3927_PCFG_SELDSF 0x00010000 304 - #define TX3927_PCFG_SELSIOC_ALL 0x0000c000 305 - #define TX3927_PCFG_SELSIOC(ch) (0x00004000<<(ch)) 306 - #define TX3927_PCFG_SELSIO_ALL 0x00003000 307 - #define TX3927_PCFG_SELSIO(ch) (0x00001000<<(ch)) 308 - #define TX3927_PCFG_SELTMR_ALL 0x00000e00 309 - #define TX3927_PCFG_SELTMR(ch) (0x00000200<<(ch)) 310 - #define TX3927_PCFG_SELDONE 0x00000100 311 - #define TX3927_PCFG_INTDMA_ALL 0x000000f0 312 - #define TX3927_PCFG_INTDMA(ch) (0x00000010<<(ch)) 313 - #define TX3927_PCFG_SELDMA_ALL 0x0000000f 314 - #define TX3927_PCFG_SELDMA(ch) (0x00000001<<(ch)) 315 - 316 - #define tx3927_sdramcptr ((struct tx3927_sdramc_reg *)TX3927_SDRAMC_REG) 317 - #define tx3927_romcptr ((struct tx3927_romc_reg *)TX3927_ROMC_REG) 318 - #define tx3927_dmaptr ((struct tx3927_dma_reg *)TX3927_DMA_REG) 319 - #define tx3927_pcicptr ((struct tx3927_pcic_reg *)TX3927_PCIC_REG) 320 - #define tx3927_ccfgptr ((struct tx3927_ccfg_reg *)TX3927_CCFG_REG) 321 - #define tx3927_sioptr(ch) ((struct txx927_sio_reg *)TX3927_SIO_REG(ch)) 322 - #define tx3927_pioptr ((struct txx9_pio_reg __iomem *)TX3927_PIO_REG) 323 - 324 - #define TX3927_REV_PCODE() (tx3927_ccfgptr->crir >> 16) 325 - #define TX3927_ROMC_BA(ch) (tx3927_romcptr->cr[(ch)] & 0xfff00000) 326 - #define TX3927_ROMC_SIZE(ch) \ 327 - (0x00100000 << ((tx3927_romcptr->cr[(ch)] >> 8) & 0xf)) 328 - #define TX3927_ROMC_WIDTH(ch) (32 >> ((tx3927_romcptr->cr[(ch)] >> 7) & 0x1)) 329 - 330 - void tx3927_wdt_init(void); 331 - void tx3927_setup(void); 332 - void tx3927_time_init(unsigned int evt_tmrnr, unsigned int src_tmrnr); 333 - void tx3927_sio_init(unsigned int sclk, unsigned int cts_mask); 334 - struct pci_controller; 335 - void tx3927_pcic_setup(struct pci_controller *channel, 336 - unsigned long sdram_size, int extarb); 337 - void tx3927_setup_pcierr_irq(void); 338 - void tx3927_irq_init(void); 339 - void tx3927_mtd_init(int ch); 340 - 341 - #endif /* __ASM_TXX9_TX3927_H */
-4
arch/mips/include/asm/txx9irq.h
··· 21 21 #endif 22 22 #endif 23 23 24 - #ifdef CONFIG_CPU_TX39XX 25 - #define TXx9_MAX_IR 16 26 - #else 27 24 #define TXx9_MAX_IR 32 28 - #endif 29 25 30 26 void txx9_irq_init(unsigned long baseaddr); 31 27 int txx9_irq(void);
-4
arch/mips/include/asm/txx9tmr.h
··· 58 58 unsigned int imbusclk); 59 59 void txx9_tmr_init(unsigned long baseaddr); 60 60 61 - #ifdef CONFIG_CPU_TX39XX 62 - #define TXX9_TIMER_BITS 24 63 - #else 64 61 #define TXX9_TIMER_BITS 32 65 - #endif 66 62 67 63 #endif /* __ASM_TXX9TMR_H */
-2
arch/mips/include/asm/vermagic.h
··· 22 22 #define MODULE_PROC_FAMILY "MIPS64_R6 " 23 23 #elif defined CONFIG_CPU_R3000 24 24 #define MODULE_PROC_FAMILY "R3000 " 25 - #elif defined CONFIG_CPU_TX39XX 26 - #define MODULE_PROC_FAMILY "TX39XX " 27 25 #elif defined CONFIG_CPU_VR41XX 28 26 #define MODULE_PROC_FAMILY "VR41XX " 29 27 #elif defined CONFIG_CPU_R4300
-1
arch/mips/kernel/Makefile
··· 44 44 45 45 sw-y := r4k_switch.o 46 46 sw-$(CONFIG_CPU_R3000) := r2300_switch.o 47 - sw-$(CONFIG_CPU_TX39XX) := r2300_switch.o 48 47 sw-$(CONFIG_CPU_CAVIUM_OCTEON) := octeon_switch.o 49 48 obj-y += $(sw-y) 50 49
-23
arch/mips/kernel/cpu-probe.c
··· 1189 1189 c->tlbsize = 48; 1190 1190 break; 1191 1191 #endif 1192 - case PRID_IMP_TX39: 1193 - c->fpu_msk31 |= FPU_CSR_CONDX | FPU_CSR_FS; 1194 - c->options = MIPS_CPU_TLB | MIPS_CPU_TX39_CACHE; 1195 - 1196 - if ((c->processor_id & 0xf0) == (PRID_REV_TX3927 & 0xf0)) { 1197 - c->cputype = CPU_TX3927; 1198 - __cpu_name[cpu] = "TX3927"; 1199 - c->tlbsize = 64; 1200 - } else { 1201 - switch (c->processor_id & PRID_REV_MASK) { 1202 - case PRID_REV_TX3912: 1203 - c->cputype = CPU_TX3912; 1204 - __cpu_name[cpu] = "TX3912"; 1205 - c->tlbsize = 32; 1206 - break; 1207 - case PRID_REV_TX3922: 1208 - c->cputype = CPU_TX3922; 1209 - __cpu_name[cpu] = "TX3922"; 1210 - c->tlbsize = 64; 1211 - break; 1212 - } 1213 - } 1214 - break; 1215 1192 case PRID_IMP_R4700: 1216 1193 c->cputype = CPU_R4700; 1217 1194 __cpu_name[cpu] = "R4700";
-22
arch/mips/kernel/cpu-r3k-probe.c
··· 118 118 c->options |= MIPS_CPU_FPU; 119 119 c->tlbsize = 64; 120 120 break; 121 - case PRID_COMP_LEGACY | PRID_IMP_TX39: 122 - c->options = MIPS_CPU_TLB | MIPS_CPU_TX39_CACHE; 123 - 124 - if ((c->processor_id & 0xf0) == (PRID_REV_TX3927 & 0xf0)) { 125 - c->cputype = CPU_TX3927; 126 - __cpu_name[cpu] = "TX3927"; 127 - c->tlbsize = 64; 128 - } else { 129 - switch (c->processor_id & PRID_REV_MASK) { 130 - case PRID_REV_TX3912: 131 - c->cputype = CPU_TX3912; 132 - __cpu_name[cpu] = "TX3912"; 133 - c->tlbsize = 32; 134 - break; 135 - case PRID_REV_TX3922: 136 - c->cputype = CPU_TX3922; 137 - __cpu_name[cpu] = "TX3922"; 138 - c->tlbsize = 64; 139 - break; 140 - } 141 - } 142 - break; 143 121 } 144 122 145 123 BUG_ON(!__cpu_name[cpu]);
+1 -1
arch/mips/kernel/entry.S
··· 100 100 SAVE_AT 101 101 SAVE_TEMP 102 102 LONG_L v0, PT_STATUS(sp) 103 - #if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX) 103 + #if defined(CONFIG_CPU_R3000) 104 104 and v0, ST0_IEP 105 105 #else 106 106 and v0, ST0_IE
+2 -2
arch/mips/kernel/genex.S
··· 162 162 .set push 163 163 .set noat 164 164 mfc0 k0, CP0_STATUS 165 - #if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX) 165 + #if defined(CONFIG_CPU_R3000) 166 166 and k0, ST0_IEP 167 167 bnez k0, 1f 168 168 ··· 644 644 get_saved_sp /* k1 := current_thread_info */ 645 645 .set noreorder 646 646 MFC0 k0, CP0_EPC 647 - #if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX) 647 + #if defined(CONFIG_CPU_R3000) 648 648 ori k1, _THREAD_MASK 649 649 xori k1, _THREAD_MASK 650 650 LONG_L v1, TI_TP_VALUE(k1)
-10
arch/mips/kernel/idle.c
··· 36 36 raw_local_irq_enable(); 37 37 } 38 38 39 - static void __cpuidle r39xx_wait(void) 40 - { 41 - if (!need_resched()) 42 - write_c0_conf(read_c0_conf() | TX39_CONF_HALT); 43 - raw_local_irq_enable(); 44 - } 45 - 46 39 void __cpuidle r4k_wait(void) 47 40 { 48 41 raw_local_irq_enable(); ··· 139 146 case CPU_R3081: 140 147 case CPU_R3081E: 141 148 cpu_wait = r3081_wait; 142 - break; 143 - case CPU_TX3927: 144 - cpu_wait = r39xx_wait; 145 149 break; 146 150 case CPU_R4200: 147 151 /* case CPU_R4300: */
-13
arch/mips/kernel/irq_txx9.c
··· 72 72 __raw_writel((__raw_readl(ilrp) & ~(0xff << ofs)) 73 73 | (txx9irq[irq_nr].level << ofs), 74 74 ilrp); 75 - #ifdef CONFIG_CPU_TX39XX 76 - /* update IRCSR */ 77 - __raw_writel(0, &txx9_ircptr->imr); 78 - __raw_writel(irc_elevel, &txx9_ircptr->imr); 79 - #endif 80 75 } 81 76 82 77 static inline void txx9_irq_mask(struct irq_data *d) ··· 83 88 __raw_writel((__raw_readl(ilrp) & ~(0xff << ofs)) 84 89 | (irc_dlevel << ofs), 85 90 ilrp); 86 - #ifdef CONFIG_CPU_TX39XX 87 - /* update IRCSR */ 88 - __raw_writel(0, &txx9_ircptr->imr); 89 - __raw_writel(irc_elevel, &txx9_ircptr->imr); 90 - /* flush write buffer */ 91 - __raw_readl(&txx9_ircptr->ssr); 92 - #else 93 91 mmiowb(); 94 - #endif 95 92 } 96 93 97 94 static void txx9_irq_mask_ack(struct irq_data *d)
-2
arch/mips/kernel/proc.c
··· 181 181 seq_puts(m, " 3k_cache"); 182 182 if (cpu_has_4k_cache) 183 183 seq_puts(m, " 4k_cache"); 184 - if (cpu_has_tx39_cache) 185 - seq_puts(m, " tx39_cache"); 186 184 if (cpu_has_octeon_cache) 187 185 seq_puts(m, " octeon_cache"); 188 186 if (raw_cpu_has_fpu)
+1 -1
arch/mips/kernel/process.c
··· 128 128 p->thread.reg17 = kthread_arg; 129 129 p->thread.reg29 = childksp; 130 130 p->thread.reg31 = (unsigned long) ret_from_kernel_thread; 131 - #if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX) 131 + #if defined(CONFIG_CPU_R3000) 132 132 status = (status & ~(ST0_KUP | ST0_IEP | ST0_IEC)) | 133 133 ((status & (ST0_KUC | ST0_IEC)) << 2); 134 134 #else
-1
arch/mips/lib/Makefile
··· 13 13 14 14 obj-$(CONFIG_CPU_GENERIC_DUMP_TLB) += dump_tlb.o 15 15 obj-$(CONFIG_CPU_R3000) += r3k_dump_tlb.o 16 - obj-$(CONFIG_CPU_TX39XX) += r3k_dump_tlb.o 17 16 18 17 # libgcc-style stuff needed in the kernel 19 18 obj-y += bswapsi.o bswapdi.o multi3.o
-4
arch/mips/lib/r3k_dump_tlb.c
··· 14 14 #include <asm/page.h> 15 15 #include <asm/tlbdebug.h> 16 16 17 - extern int r3k_have_wired_reg; 18 - 19 17 void dump_tlb_regs(void) 20 18 { 21 19 pr_info("Index : %0x\n", read_c0_index()); 22 20 pr_info("EntryHi : %0lx\n", read_c0_entryhi()); 23 21 pr_info("EntryLo : %0lx\n", read_c0_entrylo0()); 24 - if (r3k_have_wired_reg) 25 - pr_info("Wired : %0x\n", read_c0_wired()); 26 22 } 27 23 28 24 static void dump_tlb(int first, int last)
-1
arch/mips/mm/Makefile
··· 36 36 obj-$(CONFIG_CPU_R4K_CACHE_TLB) += c-r4k.o cex-gen.o tlb-r4k.o 37 37 obj-$(CONFIG_CPU_R3000) += c-r3k.o 38 38 obj-$(CONFIG_CPU_SB1) += c-r4k.o cerr-sb1.o cex-sb1.o tlb-r4k.o 39 - obj-$(CONFIG_CPU_TX39XX) += c-tx39.o 40 39 obj-$(CONFIG_CPU_CAVIUM_OCTEON) += c-octeon.o cex-oct.o tlb-r4k.o 41 40 42 41 obj-$(CONFIG_IP22_CPU_SCACHE) += sc-ip22.o
-414
arch/mips/mm/c-tx39.c
··· 1 - // SPDX-License-Identifier: GPL-2.0 2 - /* 3 - * r2300.c: R2000 and R3000 specific mmu/cache code. 4 - * 5 - * Copyright (C) 1996 David S. Miller (davem@davemloft.net) 6 - * 7 - * with a lot of changes to make this thing work for R3000s 8 - * Tx39XX R4k style caches added. HK 9 - * Copyright (C) 1998, 1999, 2000 Harald Koerfgen 10 - * Copyright (C) 1998 Gleb Raiko & Vladimir Roganov 11 - */ 12 - #include <linux/init.h> 13 - #include <linux/kernel.h> 14 - #include <linux/sched.h> 15 - #include <linux/smp.h> 16 - #include <linux/mm.h> 17 - 18 - #include <asm/cacheops.h> 19 - #include <asm/page.h> 20 - #include <asm/mmu_context.h> 21 - #include <asm/isadep.h> 22 - #include <asm/io.h> 23 - #include <asm/bootinfo.h> 24 - #include <asm/cpu.h> 25 - 26 - /* For R3000 cores with R4000 style caches */ 27 - static unsigned long icache_size, dcache_size; /* Size in bytes */ 28 - 29 - #include <asm/r4kcache.h> 30 - 31 - /* This sequence is required to ensure icache is disabled immediately */ 32 - #define TX39_STOP_STREAMING() \ 33 - __asm__ __volatile__( \ 34 - ".set push\n\t" \ 35 - ".set noreorder\n\t" \ 36 - "b 1f\n\t" \ 37 - "nop\n\t" \ 38 - "1:\n\t" \ 39 - ".set pop" \ 40 - ) 41 - 42 - /* TX39H-style cache flush routines. */ 43 - static void tx39h_flush_icache_all(void) 44 - { 45 - unsigned long flags, config; 46 - 47 - /* disable icache (set ICE#) */ 48 - local_irq_save(flags); 49 - config = read_c0_conf(); 50 - write_c0_conf(config & ~TX39_CONF_ICE); 51 - TX39_STOP_STREAMING(); 52 - blast_icache16(); 53 - write_c0_conf(config); 54 - local_irq_restore(flags); 55 - } 56 - 57 - static void tx39h_dma_cache_wback_inv(unsigned long addr, unsigned long size) 58 - { 59 - /* Catch bad driver code */ 60 - BUG_ON(size == 0); 61 - 62 - iob(); 63 - blast_inv_dcache_range(addr, addr + size); 64 - } 65 - 66 - 67 - /* TX39H2,TX39H3 */ 68 - static inline void tx39_blast_dcache_page(unsigned long addr) 69 - { 70 - if (current_cpu_type() != CPU_TX3912) 71 - blast_dcache16_page(addr); 72 - } 73 - 74 - static inline void tx39_blast_dcache_page_indexed(unsigned long addr) 75 - { 76 - blast_dcache16_page_indexed(addr); 77 - } 78 - 79 - static inline void tx39_blast_dcache(void) 80 - { 81 - blast_dcache16(); 82 - } 83 - 84 - static inline void tx39_blast_icache_page(unsigned long addr) 85 - { 86 - unsigned long flags, config; 87 - /* disable icache (set ICE#) */ 88 - local_irq_save(flags); 89 - config = read_c0_conf(); 90 - write_c0_conf(config & ~TX39_CONF_ICE); 91 - TX39_STOP_STREAMING(); 92 - blast_icache16_page(addr); 93 - write_c0_conf(config); 94 - local_irq_restore(flags); 95 - } 96 - 97 - static inline void tx39_blast_icache_page_indexed(unsigned long addr) 98 - { 99 - unsigned long flags, config; 100 - /* disable icache (set ICE#) */ 101 - local_irq_save(flags); 102 - config = read_c0_conf(); 103 - write_c0_conf(config & ~TX39_CONF_ICE); 104 - TX39_STOP_STREAMING(); 105 - blast_icache16_page_indexed(addr); 106 - write_c0_conf(config); 107 - local_irq_restore(flags); 108 - } 109 - 110 - static inline void tx39_blast_icache(void) 111 - { 112 - unsigned long flags, config; 113 - /* disable icache (set ICE#) */ 114 - local_irq_save(flags); 115 - config = read_c0_conf(); 116 - write_c0_conf(config & ~TX39_CONF_ICE); 117 - TX39_STOP_STREAMING(); 118 - blast_icache16(); 119 - write_c0_conf(config); 120 - local_irq_restore(flags); 121 - } 122 - 123 - static void tx39__flush_cache_vmap(void) 124 - { 125 - tx39_blast_dcache(); 126 - } 127 - 128 - static void tx39__flush_cache_vunmap(void) 129 - { 130 - tx39_blast_dcache(); 131 - } 132 - 133 - static inline void tx39_flush_cache_all(void) 134 - { 135 - if (!cpu_has_dc_aliases) 136 - return; 137 - 138 - tx39_blast_dcache(); 139 - } 140 - 141 - static inline void tx39___flush_cache_all(void) 142 - { 143 - tx39_blast_dcache(); 144 - tx39_blast_icache(); 145 - } 146 - 147 - static void tx39_flush_cache_mm(struct mm_struct *mm) 148 - { 149 - if (!cpu_has_dc_aliases) 150 - return; 151 - 152 - if (cpu_context(smp_processor_id(), mm) != 0) 153 - tx39_blast_dcache(); 154 - } 155 - 156 - static void tx39_flush_cache_range(struct vm_area_struct *vma, 157 - unsigned long start, unsigned long end) 158 - { 159 - if (!cpu_has_dc_aliases) 160 - return; 161 - if (!(cpu_context(smp_processor_id(), vma->vm_mm))) 162 - return; 163 - 164 - tx39_blast_dcache(); 165 - } 166 - 167 - static void tx39_flush_cache_page(struct vm_area_struct *vma, unsigned long page, unsigned long pfn) 168 - { 169 - int exec = vma->vm_flags & VM_EXEC; 170 - struct mm_struct *mm = vma->vm_mm; 171 - pmd_t *pmdp; 172 - pte_t *ptep; 173 - 174 - /* 175 - * If ownes no valid ASID yet, cannot possibly have gotten 176 - * this page into the cache. 177 - */ 178 - if (cpu_context(smp_processor_id(), mm) == 0) 179 - return; 180 - 181 - page &= PAGE_MASK; 182 - pmdp = pmd_off(mm, page); 183 - ptep = pte_offset_kernel(pmdp, page); 184 - 185 - /* 186 - * If the page isn't marked valid, the page cannot possibly be 187 - * in the cache. 188 - */ 189 - if (!(pte_val(*ptep) & _PAGE_PRESENT)) 190 - return; 191 - 192 - /* 193 - * Doing flushes for another ASID than the current one is 194 - * too difficult since stupid R4k caches do a TLB translation 195 - * for every cache flush operation. So we do indexed flushes 196 - * in that case, which doesn't overly flush the cache too much. 197 - */ 198 - if ((mm == current->active_mm) && (pte_val(*ptep) & _PAGE_VALID)) { 199 - if (cpu_has_dc_aliases || exec) 200 - tx39_blast_dcache_page(page); 201 - if (exec) 202 - tx39_blast_icache_page(page); 203 - 204 - return; 205 - } 206 - 207 - /* 208 - * Do indexed flush, too much work to get the (possible) TLB refills 209 - * to work correctly. 210 - */ 211 - if (cpu_has_dc_aliases || exec) 212 - tx39_blast_dcache_page_indexed(page); 213 - if (exec) 214 - tx39_blast_icache_page_indexed(page); 215 - } 216 - 217 - static void local_tx39_flush_data_cache_page(void * addr) 218 - { 219 - tx39_blast_dcache_page((unsigned long)addr); 220 - } 221 - 222 - static void tx39_flush_data_cache_page(unsigned long addr) 223 - { 224 - tx39_blast_dcache_page(addr); 225 - } 226 - 227 - static void tx39_flush_icache_range(unsigned long start, unsigned long end) 228 - { 229 - if (end - start > dcache_size) 230 - tx39_blast_dcache(); 231 - else 232 - protected_blast_dcache_range(start, end); 233 - 234 - if (end - start > icache_size) 235 - tx39_blast_icache(); 236 - else { 237 - unsigned long flags, config; 238 - /* disable icache (set ICE#) */ 239 - local_irq_save(flags); 240 - config = read_c0_conf(); 241 - write_c0_conf(config & ~TX39_CONF_ICE); 242 - TX39_STOP_STREAMING(); 243 - protected_blast_icache_range(start, end); 244 - write_c0_conf(config); 245 - local_irq_restore(flags); 246 - } 247 - } 248 - 249 - static void tx39_flush_kernel_vmap_range(unsigned long vaddr, int size) 250 - { 251 - BUG(); 252 - } 253 - 254 - static void tx39_dma_cache_wback_inv(unsigned long addr, unsigned long size) 255 - { 256 - unsigned long end; 257 - 258 - if (((size | addr) & (PAGE_SIZE - 1)) == 0) { 259 - end = addr + size; 260 - do { 261 - tx39_blast_dcache_page(addr); 262 - addr += PAGE_SIZE; 263 - } while(addr != end); 264 - } else if (size > dcache_size) { 265 - tx39_blast_dcache(); 266 - } else { 267 - blast_dcache_range(addr, addr + size); 268 - } 269 - } 270 - 271 - static void tx39_dma_cache_inv(unsigned long addr, unsigned long size) 272 - { 273 - unsigned long end; 274 - 275 - if (((size | addr) & (PAGE_SIZE - 1)) == 0) { 276 - end = addr + size; 277 - do { 278 - tx39_blast_dcache_page(addr); 279 - addr += PAGE_SIZE; 280 - } while(addr != end); 281 - } else if (size > dcache_size) { 282 - tx39_blast_dcache(); 283 - } else { 284 - blast_inv_dcache_range(addr, addr + size); 285 - } 286 - } 287 - 288 - static __init void tx39_probe_cache(void) 289 - { 290 - unsigned long config; 291 - 292 - config = read_c0_conf(); 293 - 294 - icache_size = 1 << (10 + ((config & TX39_CONF_ICS_MASK) >> 295 - TX39_CONF_ICS_SHIFT)); 296 - dcache_size = 1 << (10 + ((config & TX39_CONF_DCS_MASK) >> 297 - TX39_CONF_DCS_SHIFT)); 298 - 299 - current_cpu_data.icache.linesz = 16; 300 - switch (current_cpu_type()) { 301 - case CPU_TX3912: 302 - current_cpu_data.icache.ways = 1; 303 - current_cpu_data.dcache.ways = 1; 304 - current_cpu_data.dcache.linesz = 4; 305 - break; 306 - 307 - case CPU_TX3927: 308 - current_cpu_data.icache.ways = 2; 309 - current_cpu_data.dcache.ways = 2; 310 - current_cpu_data.dcache.linesz = 16; 311 - break; 312 - 313 - case CPU_TX3922: 314 - default: 315 - current_cpu_data.icache.ways = 1; 316 - current_cpu_data.dcache.ways = 1; 317 - current_cpu_data.dcache.linesz = 16; 318 - break; 319 - } 320 - } 321 - 322 - void tx39_cache_init(void) 323 - { 324 - extern void build_clear_page(void); 325 - extern void build_copy_page(void); 326 - unsigned long config; 327 - 328 - config = read_c0_conf(); 329 - config &= ~TX39_CONF_WBON; 330 - write_c0_conf(config); 331 - 332 - tx39_probe_cache(); 333 - 334 - switch (current_cpu_type()) { 335 - case CPU_TX3912: 336 - /* TX39/H core (writethru direct-map cache) */ 337 - __flush_cache_vmap = tx39__flush_cache_vmap; 338 - __flush_cache_vunmap = tx39__flush_cache_vunmap; 339 - flush_cache_all = tx39h_flush_icache_all; 340 - __flush_cache_all = tx39h_flush_icache_all; 341 - flush_cache_mm = (void *) tx39h_flush_icache_all; 342 - flush_cache_range = (void *) tx39h_flush_icache_all; 343 - flush_cache_page = (void *) tx39h_flush_icache_all; 344 - flush_icache_range = (void *) tx39h_flush_icache_all; 345 - local_flush_icache_range = (void *) tx39h_flush_icache_all; 346 - 347 - local_flush_data_cache_page = (void *) tx39h_flush_icache_all; 348 - flush_data_cache_page = (void *) tx39h_flush_icache_all; 349 - 350 - _dma_cache_wback_inv = tx39h_dma_cache_wback_inv; 351 - 352 - shm_align_mask = PAGE_SIZE - 1; 353 - 354 - break; 355 - 356 - case CPU_TX3922: 357 - case CPU_TX3927: 358 - default: 359 - /* TX39/H2,H3 core (writeback 2way-set-associative cache) */ 360 - /* board-dependent init code may set WBON */ 361 - 362 - __flush_cache_vmap = tx39__flush_cache_vmap; 363 - __flush_cache_vunmap = tx39__flush_cache_vunmap; 364 - 365 - flush_cache_all = tx39_flush_cache_all; 366 - __flush_cache_all = tx39___flush_cache_all; 367 - flush_cache_mm = tx39_flush_cache_mm; 368 - flush_cache_range = tx39_flush_cache_range; 369 - flush_cache_page = tx39_flush_cache_page; 370 - flush_icache_range = tx39_flush_icache_range; 371 - local_flush_icache_range = tx39_flush_icache_range; 372 - 373 - __flush_kernel_vmap_range = tx39_flush_kernel_vmap_range; 374 - 375 - local_flush_data_cache_page = local_tx39_flush_data_cache_page; 376 - flush_data_cache_page = tx39_flush_data_cache_page; 377 - 378 - _dma_cache_wback_inv = tx39_dma_cache_wback_inv; 379 - _dma_cache_wback = tx39_dma_cache_wback_inv; 380 - _dma_cache_inv = tx39_dma_cache_inv; 381 - 382 - shm_align_mask = max_t(unsigned long, 383 - (dcache_size / current_cpu_data.dcache.ways) - 1, 384 - PAGE_SIZE - 1); 385 - 386 - break; 387 - } 388 - 389 - __flush_icache_user_range = flush_icache_range; 390 - __local_flush_icache_user_range = local_flush_icache_range; 391 - 392 - current_cpu_data.icache.waysize = icache_size / current_cpu_data.icache.ways; 393 - current_cpu_data.dcache.waysize = dcache_size / current_cpu_data.dcache.ways; 394 - 395 - current_cpu_data.icache.sets = 396 - current_cpu_data.icache.waysize / current_cpu_data.icache.linesz; 397 - current_cpu_data.dcache.sets = 398 - current_cpu_data.dcache.waysize / current_cpu_data.dcache.linesz; 399 - 400 - if (current_cpu_data.dcache.waysize > PAGE_SIZE) 401 - current_cpu_data.dcache.flags |= MIPS_CACHE_ALIASES; 402 - 403 - current_cpu_data.icache.waybit = 0; 404 - current_cpu_data.dcache.waybit = 0; 405 - 406 - pr_info("Primary instruction cache %ldkB, linesize %d bytes\n", 407 - icache_size >> 10, current_cpu_data.icache.linesz); 408 - pr_info("Primary data cache %ldkB, linesize %d bytes\n", 409 - dcache_size >> 10, current_cpu_data.dcache.linesz); 410 - 411 - build_clear_page(); 412 - build_copy_page(); 413 - tx39h_flush_icache_all(); 414 - }
-5
arch/mips/mm/cache.c
··· 195 195 196 196 r4k_cache_init(); 197 197 } 198 - if (cpu_has_tx39_cache) { 199 - extern void __weak tx39_cache_init(void); 200 - 201 - tx39_cache_init(); 202 - } 203 198 204 199 if (cpu_has_octeon_cache) { 205 200 extern void __weak octeon_cache_init(void);
+2 -38
arch/mips/mm/tlb-r3k.c
··· 36 36 "nop\n\t" \ 37 37 ".set pop\n\t") 38 38 39 - int r3k_have_wired_reg; /* Should be in cpu_data? */ 40 - 41 39 /* TLB operations. */ 42 40 static void local_flush_tlb_from(int entry) 43 41 { ··· 60 62 printk("[tlball]"); 61 63 #endif 62 64 local_irq_save(flags); 63 - local_flush_tlb_from(r3k_have_wired_reg ? read_c0_wired() : 8); 65 + local_flush_tlb_from(8); 64 66 local_irq_restore(flags); 65 67 } 66 68 ··· 222 224 unsigned long old_ctx; 223 225 static unsigned long wired = 0; 224 226 225 - if (r3k_have_wired_reg) { /* TX39XX */ 226 - unsigned long old_pagemask; 227 - unsigned long w; 228 - 229 - #ifdef DEBUG_TLB 230 - printk("[tlbwired<entry lo0 %8x, hi %8x\n, pagemask %8x>]\n", 231 - entrylo0, entryhi, pagemask); 232 - #endif 233 - 234 - local_irq_save(flags); 235 - /* Save old context and create impossible VPN2 value */ 236 - old_ctx = read_c0_entryhi() & asid_mask; 237 - old_pagemask = read_c0_pagemask(); 238 - w = read_c0_wired(); 239 - write_c0_wired(w + 1); 240 - write_c0_index(w << 8); 241 - write_c0_pagemask(pagemask); 242 - write_c0_entryhi(entryhi); 243 - write_c0_entrylo0(entrylo0); 244 - BARRIER; 245 - tlb_write_indexed(); 246 - 247 - write_c0_entryhi(old_ctx); 248 - write_c0_pagemask(old_pagemask); 249 - local_flush_tlb_all(); 250 - local_irq_restore(flags); 251 - 252 - } else if (wired < 8) { 227 + if (wired < 8) { 253 228 #ifdef DEBUG_TLB 254 229 printk("[tlbwired<entry lo0 %8x, hi %8x\n>]\n", 255 230 entrylo0, entryhi); ··· 243 272 244 273 void tlb_init(void) 245 274 { 246 - switch (current_cpu_type()) { 247 - case CPU_TX3922: 248 - case CPU_TX3927: 249 - r3k_have_wired_reg = 1; 250 - write_c0_wired(0); /* Set to 8 on reset... */ 251 - break; 252 - } 253 275 local_flush_tlb_from(0); 254 276 build_tlb_refill_handler(); 255 277 }
-2
arch/mips/pci/Makefile
··· 13 13 obj-$(CONFIG_MIPS_BONITO64) += ops-bonito64.o 14 14 obj-$(CONFIG_PCI_GT64XXX_PCI0) += ops-gt64xxx_pci0.o 15 15 obj-$(CONFIG_MIPS_MSC) += ops-msc.o 16 - obj-$(CONFIG_SOC_TX3927) += ops-tx3927.o 17 16 obj-$(CONFIG_PCI_VR41XX) += ops-vr41xx.o pci-vr41xx.o 18 17 obj-$(CONFIG_PCI_TX4927) += ops-tx4927.o 19 18 obj-$(CONFIG_BCM47XX) += pci-bcm47xx.o ··· 45 46 obj-$(CONFIG_TANBAC_TB0219) += fixup-tb0219.o 46 47 obj-$(CONFIG_TANBAC_TB0226) += fixup-tb0226.o 47 48 obj-$(CONFIG_TANBAC_TB0287) += fixup-tb0287.o 48 - obj-$(CONFIG_TOSHIBA_JMR3927) += fixup-jmr3927.o 49 49 obj-$(CONFIG_SOC_TX4927) += pci-tx4927.o 50 50 obj-$(CONFIG_SOC_TX4938) += pci-tx4938.o 51 51 obj-$(CONFIG_TOSHIBA_RBTX4927) += fixup-rbtx4927.o
-79
arch/mips/pci/fixup-jmr3927.c
··· 1 - /* 2 - * 3 - * BRIEF MODULE DESCRIPTION 4 - * Board specific pci fixups. 5 - * 6 - * Copyright 2001 MontaVista Software Inc. 7 - * Author: MontaVista Software, Inc. 8 - * ppopov@mvista.com or source@mvista.com 9 - * 10 - * This program is free software; you can redistribute it and/or modify it 11 - * under the terms of the GNU General Public License as published by the 12 - * Free Software Foundation; either version 2 of the License, or (at your 13 - * option) any later version. 14 - * 15 - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED 16 - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 17 - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 - * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 21 - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 22 - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 - * 26 - * You should have received a copy of the GNU General Public License along 27 - * with this program; if not, write to the Free Software Foundation, Inc., 28 - * 675 Mass Ave, Cambridge, MA 02139, USA. 29 - */ 30 - #include <linux/types.h> 31 - #include <asm/txx9/pci.h> 32 - #include <asm/txx9/jmr3927.h> 33 - 34 - int jmr3927_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 35 - { 36 - unsigned char irq = pin; 37 - 38 - /* IRQ rotation (PICMG) */ 39 - irq--; /* 0-3 */ 40 - if (slot == TX3927_PCIC_IDSEL_AD_TO_SLOT(23)) { 41 - /* PCI CardSlot (IDSEL=A23, DevNu=12) */ 42 - /* PCIA => PCIC (IDSEL=A23) */ 43 - /* NOTE: JMR3927 JP1 must be set to OPEN */ 44 - irq = (irq + 2) % 4; 45 - } else if (slot == TX3927_PCIC_IDSEL_AD_TO_SLOT(22)) { 46 - /* PCI CardSlot (IDSEL=A22, DevNu=11) */ 47 - /* PCIA => PCIA (IDSEL=A22) */ 48 - /* NOTE: JMR3927 JP1 must be set to OPEN */ 49 - irq = (irq + 0) % 4; 50 - } else { 51 - /* PCI Backplane */ 52 - if (txx9_pci_option & TXX9_PCI_OPT_PICMG) 53 - irq = (irq + 33 - slot) % 4; 54 - else 55 - irq = (irq + 3 + slot) % 4; 56 - } 57 - irq++; /* 1-4 */ 58 - 59 - switch (irq) { 60 - case 1: 61 - irq = JMR3927_IRQ_IOC_PCIA; 62 - break; 63 - case 2: 64 - irq = JMR3927_IRQ_IOC_PCIB; 65 - break; 66 - case 3: 67 - irq = JMR3927_IRQ_IOC_PCIC; 68 - break; 69 - case 4: 70 - irq = JMR3927_IRQ_IOC_PCID; 71 - break; 72 - } 73 - 74 - /* Check OnBoard Ethernet (IDSEL=A24, DevNu=13) */ 75 - if (dev->bus->parent == NULL && 76 - slot == TX3927_PCIC_IDSEL_AD_TO_SLOT(24)) 77 - irq = JMR3927_IRQ_ETHER0; 78 - return irq; 79 - }
-231
arch/mips/pci/ops-tx3927.c
··· 1 - /* 2 - * Copyright 2001 MontaVista Software Inc. 3 - * Author: MontaVista Software, Inc. 4 - * ahennessy@mvista.com 5 - * 6 - * Copyright (C) 2000-2001 Toshiba Corporation 7 - * Copyright (C) 2004 by Ralf Baechle (ralf@linux-mips.org) 8 - * 9 - * Based on arch/mips/ddb5xxx/ddb5477/pci_ops.c 10 - * 11 - * Define the pci_ops for TX3927. 12 - * 13 - * Much of the code is derived from the original DDB5074 port by 14 - * Geert Uytterhoeven <geert@linux-m68k.org> 15 - * 16 - * This program is free software; you can redistribute it and/or modify it 17 - * under the terms of the GNU General Public License as published by the 18 - * Free Software Foundation; either version 2 of the License, or (at your 19 - * option) any later version. 20 - * 21 - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED 22 - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 23 - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 24 - * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 25 - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 27 - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 28 - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30 - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 - * 32 - * You should have received a copy of the GNU General Public License along 33 - * with this program; if not, write to the Free Software Foundation, Inc., 34 - * 675 Mass Ave, Cambridge, MA 02139, USA. 35 - */ 36 - #include <linux/types.h> 37 - #include <linux/pci.h> 38 - #include <linux/kernel.h> 39 - #include <linux/init.h> 40 - #include <linux/interrupt.h> 41 - #include <linux/irq.h> 42 - 43 - #include <asm/addrspace.h> 44 - #include <asm/txx9irq.h> 45 - #include <asm/txx9/pci.h> 46 - #include <asm/txx9/tx3927.h> 47 - 48 - static int mkaddr(struct pci_bus *bus, unsigned char devfn, unsigned char where) 49 - { 50 - if (bus->parent == NULL && 51 - devfn >= PCI_DEVFN(TX3927_PCIC_MAX_DEVNU, 0)) 52 - return -1; 53 - tx3927_pcicptr->ica = 54 - ((bus->number & 0xff) << 0x10) | 55 - ((devfn & 0xff) << 0x08) | 56 - (where & 0xfc) | (bus->parent ? 1 : 0); 57 - 58 - /* clear M_ABORT and Disable M_ABORT Int. */ 59 - tx3927_pcicptr->pcistat |= PCI_STATUS_REC_MASTER_ABORT; 60 - tx3927_pcicptr->pcistatim &= ~PCI_STATUS_REC_MASTER_ABORT; 61 - return 0; 62 - } 63 - 64 - static inline int check_abort(void) 65 - { 66 - if (tx3927_pcicptr->pcistat & PCI_STATUS_REC_MASTER_ABORT) { 67 - tx3927_pcicptr->pcistat |= PCI_STATUS_REC_MASTER_ABORT; 68 - tx3927_pcicptr->pcistatim |= PCI_STATUS_REC_MASTER_ABORT; 69 - /* flush write buffer */ 70 - iob(); 71 - return PCIBIOS_DEVICE_NOT_FOUND; 72 - } 73 - return PCIBIOS_SUCCESSFUL; 74 - } 75 - 76 - static int tx3927_pci_read_config(struct pci_bus *bus, unsigned int devfn, 77 - int where, int size, u32 * val) 78 - { 79 - if (mkaddr(bus, devfn, where)) { 80 - *val = 0xffffffff; 81 - return PCIBIOS_DEVICE_NOT_FOUND; 82 - } 83 - 84 - switch (size) { 85 - case 1: 86 - *val = *(volatile u8 *) ((unsigned long) & tx3927_pcicptr->icd | (where & 3)); 87 - break; 88 - 89 - case 2: 90 - *val = le16_to_cpu(*(volatile u16 *) ((unsigned long) & tx3927_pcicptr->icd | (where & 3))); 91 - break; 92 - 93 - case 4: 94 - *val = le32_to_cpu(tx3927_pcicptr->icd); 95 - break; 96 - } 97 - 98 - return check_abort(); 99 - } 100 - 101 - static int tx3927_pci_write_config(struct pci_bus *bus, unsigned int devfn, 102 - int where, int size, u32 val) 103 - { 104 - if (mkaddr(bus, devfn, where)) 105 - return PCIBIOS_DEVICE_NOT_FOUND; 106 - 107 - switch (size) { 108 - case 1: 109 - *(volatile u8 *) ((unsigned long) & tx3927_pcicptr->icd | (where & 3)) = val; 110 - break; 111 - 112 - case 2: 113 - *(volatile u16 *) ((unsigned long) & tx3927_pcicptr->icd | (where & 2)) = 114 - cpu_to_le16(val); 115 - break; 116 - 117 - case 4: 118 - tx3927_pcicptr->icd = cpu_to_le32(val); 119 - } 120 - 121 - return check_abort(); 122 - } 123 - 124 - static struct pci_ops tx3927_pci_ops = { 125 - .read = tx3927_pci_read_config, 126 - .write = tx3927_pci_write_config, 127 - }; 128 - 129 - void __init tx3927_pcic_setup(struct pci_controller *channel, 130 - unsigned long sdram_size, int extarb) 131 - { 132 - unsigned long flags; 133 - unsigned long io_base = 134 - channel->io_resource->start + mips_io_port_base - IO_BASE; 135 - unsigned long io_size = 136 - channel->io_resource->end - channel->io_resource->start; 137 - unsigned long io_pciaddr = 138 - channel->io_resource->start - channel->io_offset; 139 - unsigned long mem_base = 140 - channel->mem_resource->start; 141 - unsigned long mem_size = 142 - channel->mem_resource->end - channel->mem_resource->start; 143 - unsigned long mem_pciaddr = 144 - channel->mem_resource->start - channel->mem_offset; 145 - 146 - printk(KERN_INFO "TX3927 PCIC -- DID:%04x VID:%04x RID:%02x Arbiter:%s", 147 - tx3927_pcicptr->did, tx3927_pcicptr->vid, 148 - tx3927_pcicptr->rid, 149 - extarb ? "External" : "Internal"); 150 - channel->pci_ops = &tx3927_pci_ops; 151 - 152 - local_irq_save(flags); 153 - /* Disable External PCI Config. Access */ 154 - tx3927_pcicptr->lbc = TX3927_PCIC_LBC_EPCAD; 155 - #ifdef __BIG_ENDIAN 156 - tx3927_pcicptr->lbc |= TX3927_PCIC_LBC_IBSE | 157 - TX3927_PCIC_LBC_TIBSE | 158 - TX3927_PCIC_LBC_TMFBSE | TX3927_PCIC_LBC_MSDSE; 159 - #endif 160 - /* LB->PCI mappings */ 161 - tx3927_pcicptr->iomas = ~(io_size - 1); 162 - tx3927_pcicptr->ilbioma = io_base; 163 - tx3927_pcicptr->ipbioma = io_pciaddr; 164 - tx3927_pcicptr->mmas = ~(mem_size - 1); 165 - tx3927_pcicptr->ilbmma = mem_base; 166 - tx3927_pcicptr->ipbmma = mem_pciaddr; 167 - /* PCI->LB mappings */ 168 - tx3927_pcicptr->iobas = 0xffffffff; 169 - tx3927_pcicptr->ioba = 0; 170 - tx3927_pcicptr->tlbioma = 0; 171 - tx3927_pcicptr->mbas = ~(sdram_size - 1); 172 - tx3927_pcicptr->mba = 0; 173 - tx3927_pcicptr->tlbmma = 0; 174 - /* Enable Direct mapping Address Space Decoder */ 175 - tx3927_pcicptr->lbc |= TX3927_PCIC_LBC_ILMDE | TX3927_PCIC_LBC_ILIDE; 176 - 177 - /* Clear All Local Bus Status */ 178 - tx3927_pcicptr->lbstat = TX3927_PCIC_LBIM_ALL; 179 - /* Enable All Local Bus Interrupts */ 180 - tx3927_pcicptr->lbim = TX3927_PCIC_LBIM_ALL; 181 - /* Clear All PCI Status Error */ 182 - tx3927_pcicptr->pcistat = TX3927_PCIC_PCISTATIM_ALL; 183 - /* Enable All PCI Status Error Interrupts */ 184 - tx3927_pcicptr->pcistatim = TX3927_PCIC_PCISTATIM_ALL; 185 - 186 - /* PCIC Int => IRC IRQ10 */ 187 - tx3927_pcicptr->il = TX3927_IR_PCI; 188 - /* Target Control (per errata) */ 189 - tx3927_pcicptr->tc = TX3927_PCIC_TC_OF8E | TX3927_PCIC_TC_IF8E; 190 - 191 - /* Enable Bus Arbiter */ 192 - if (!extarb) 193 - tx3927_pcicptr->pbapmc = TX3927_PCIC_PBAPMC_PBAEN; 194 - 195 - tx3927_pcicptr->pcicmd = PCI_COMMAND_MASTER | 196 - PCI_COMMAND_MEMORY | 197 - PCI_COMMAND_IO | 198 - PCI_COMMAND_PARITY | PCI_COMMAND_SERR; 199 - local_irq_restore(flags); 200 - } 201 - 202 - static irqreturn_t tx3927_pcierr_interrupt(int irq, void *dev_id) 203 - { 204 - struct pt_regs *regs = get_irq_regs(); 205 - 206 - if (txx9_pci_err_action != TXX9_PCI_ERR_IGNORE) { 207 - printk(KERN_WARNING "PCI error interrupt at 0x%08lx.\n", 208 - regs->cp0_epc); 209 - printk(KERN_WARNING "pcistat:%02x, lbstat:%04lx\n", 210 - tx3927_pcicptr->pcistat, tx3927_pcicptr->lbstat); 211 - } 212 - if (txx9_pci_err_action != TXX9_PCI_ERR_PANIC) { 213 - /* clear all pci errors */ 214 - tx3927_pcicptr->pcistat |= TX3927_PCIC_PCISTATIM_ALL; 215 - tx3927_pcicptr->istat = TX3927_PCIC_IIM_ALL; 216 - tx3927_pcicptr->tstat = TX3927_PCIC_TIM_ALL; 217 - tx3927_pcicptr->lbstat = TX3927_PCIC_LBIM_ALL; 218 - return IRQ_HANDLED; 219 - } 220 - console_verbose(); 221 - panic("PCI error."); 222 - } 223 - 224 - void __init tx3927_setup_pcierr_irq(void) 225 - { 226 - if (request_irq(TXX9_IRQ_BASE + TX3927_IR_PCI, 227 - tx3927_pcierr_interrupt, 228 - 0, "PCI error", 229 - (void *)TX3927_PCIC_REG)) 230 - printk(KERN_WARNING "Failed to request irq for PCIERR\n"); 231 - }
-18
arch/mips/txx9/Kconfig
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - config MACH_TX39XX 3 - bool 4 - select MACH_TXX9 5 - select SYS_HAS_CPU_TX39XX 6 - 7 2 config MACH_TX49XX 8 3 bool 9 4 select BOOT_ELF32 ··· 19 24 select SYS_SUPPORTS_BIG_ENDIAN 20 25 select COMMON_CLK 21 26 22 - config TOSHIBA_JMR3927 23 - bool "Toshiba JMR-TX3927 board" 24 - depends on MACH_TX39XX 25 - select SOC_TX3927 26 - 27 27 config TOSHIBA_RBTX4927 28 28 bool "Toshiba RBTX49[23]7 board" 29 29 depends on MACH_TX49XX ··· 28 38 help 29 39 This Toshiba board is based on the TX4927 processor. Say Y here to 30 40 support this machine type 31 - 32 - config SOC_TX3927 33 - bool 34 - select CEVT_TXX9 35 - imply HAS_TXX9_SERIAL 36 - select HAVE_PCI 37 - select IRQ_TXX9 38 - select GPIO_TXX9 39 41 40 42 config SOC_TX4927 41 43 bool
-6
arch/mips/txx9/Makefile
··· 2 2 # 3 3 # Common TXx9 4 4 # 5 - obj-$(CONFIG_MACH_TX39XX) += generic/ 6 5 obj-$(CONFIG_MACH_TX49XX) += generic/ 7 - 8 - # 9 - # Toshiba JMR-TX3927 board 10 - # 11 - obj-$(CONFIG_TOSHIBA_JMR3927) += jmr3927/ 12 6 13 7 # 14 8 # Toshiba RBTX49XX boards
-3
arch/mips/txx9/Platform
··· 1 - cflags-$(CONFIG_MACH_TX39XX) += \ 2 - -I$(srctree)/arch/mips/include/asm/mach-tx39xx 3 1 cflags-$(CONFIG_MACH_TX49XX) += \ 4 2 -I$(srctree)/arch/mips/include/asm/mach-tx49xx 5 3 6 - load-$(CONFIG_MACH_TX39XX) += 0xffffffff80050000 7 4 load-$(CONFIG_MACH_TX49XX) += 0xffffffff80100000
-1
arch/mips/txx9/generic/Makefile
··· 5 5 6 6 obj-y += setup.o 7 7 obj-$(CONFIG_PCI) += pci.o 8 - obj-$(CONFIG_SOC_TX3927) += setup_tx3927.o irq_tx3927.o 9 8 obj-$(CONFIG_SOC_TX4927) += mem_tx4927.o setup_tx4927.o irq_tx4927.o 10 9 obj-$(CONFIG_SOC_TX4938) += mem_tx4927.o setup_tx4938.o irq_tx4938.o 11 10 obj-$(CONFIG_TOSHIBA_FPCIB0) += smsc_fdc37m81x.o
-25
arch/mips/txx9/generic/irq_tx3927.c
··· 1 - /* 2 - * Common tx3927 irq handler 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 - * Copyright 2001 MontaVista Software Inc. 9 - * Copyright (C) 2000-2001 Toshiba Corporation 10 - */ 11 - #include <linux/init.h> 12 - #include <asm/txx9irq.h> 13 - #include <asm/txx9/tx3927.h> 14 - 15 - void __init tx3927_irq_init(void) 16 - { 17 - int i; 18 - 19 - txx9_irq_init(TX3927_IRC_REG); 20 - /* raise priority for timers, sio */ 21 - for (i = 0; i < TX3927_NR_TMR; i++) 22 - txx9_irq_set_pri(TX3927_IR_TMR(i), 6); 23 - for (i = 0; i < TX3927_NR_SIO; i++) 24 - txx9_irq_set_pri(TX3927_IR_SIO(i), 7); 25 - }
-55
arch/mips/txx9/generic/setup.c
··· 78 78 unsigned int txx9_cpu_clock; 79 79 unsigned int txx9_gbus_clock; 80 80 81 - #ifdef CONFIG_CPU_TX39XX 82 - /* don't enable by default - see errata */ 83 - int txx9_ccfg_toeon __initdata; 84 - #else 85 81 int txx9_ccfg_toeon __initdata = 1; 86 - #endif 87 82 88 83 #define BOARD_VEC(board) extern struct txx9_board_vec board; 89 84 #include <asm/txx9/boards.h> ··· 189 194 if (conf & TX49_CONF_DC) 190 195 pr_info("TX49XX D-Cache disabled.\n"); 191 196 } 192 - #elif defined(CONFIG_CPU_TX39XX) 193 - /* flush all cache on very early stage (before tx39_cache_init) */ 194 - static void __init early_flush_dcache(void) 195 - { 196 - unsigned int conf = read_c0_config(); 197 - unsigned int dc_size = 1 << (10 + ((conf & TX39_CONF_DCS_MASK) >> 198 - TX39_CONF_DCS_SHIFT)); 199 - unsigned int linesz = 16; 200 - unsigned long addr, end; 201 - 202 - end = INDEX_BASE + dc_size / 2; 203 - /* 2way, waybit=0 */ 204 - for (addr = INDEX_BASE; addr < end; addr += linesz) { 205 - cache_op(Index_Writeback_Inv_D, addr | 0); 206 - cache_op(Index_Writeback_Inv_D, addr | 1); 207 - } 208 - } 209 - 210 - static void __init txx9_cache_fixup(void) 211 - { 212 - unsigned int conf; 213 - 214 - conf = read_c0_config(); 215 - /* flush and disable */ 216 - if (txx9_ic_disable) { 217 - conf &= ~TX39_CONF_ICE; 218 - write_c0_config(conf); 219 - } 220 - if (txx9_dc_disable) { 221 - early_flush_dcache(); 222 - conf &= ~TX39_CONF_DCE; 223 - write_c0_config(conf); 224 - } 225 - 226 - /* enable cache */ 227 - conf = read_c0_config(); 228 - if (!txx9_ic_disable) 229 - conf |= TX39_CONF_ICE; 230 - if (!txx9_dc_disable) 231 - conf |= TX39_CONF_DCE; 232 - write_c0_config(conf); 233 - 234 - if (!(conf & TX39_CONF_ICE)) 235 - pr_info("TX39XX I-Cache disabled.\n"); 236 - if (!(conf & TX39_CONF_DCE)) 237 - pr_info("TX39XX D-Cache disabled.\n"); 238 - } 239 197 #else 240 198 static inline void txx9_cache_fixup(void) 241 199 { ··· 250 302 } 251 303 252 304 /* select "default" board */ 253 - #ifdef CONFIG_TOSHIBA_JMR3927 254 - txx9_board_vec = &jmr3927_vec; 255 - #endif 256 305 #ifdef CONFIG_CPU_TX49XX 257 306 switch (TX4938_REV_PCODE()) { 258 307 #ifdef CONFIG_TOSHIBA_RBTX4927
-136
arch/mips/txx9/generic/setup_tx3927.c
··· 1 - /* 2 - * TX3927 setup routines 3 - * Based on linux/arch/mips/txx9/jmr3927/setup.c 4 - * 5 - * Copyright 2001 MontaVista Software Inc. 6 - * Copyright (C) 2000-2001 Toshiba Corporation 7 - * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org) 8 - * 9 - * This file is subject to the terms and conditions of the GNU General Public 10 - * License. See the file "COPYING" in the main directory of this archive 11 - * for more details. 12 - */ 13 - #include <linux/init.h> 14 - #include <linux/ioport.h> 15 - #include <linux/delay.h> 16 - #include <linux/param.h> 17 - #include <linux/io.h> 18 - #include <linux/mtd/physmap.h> 19 - #include <asm/mipsregs.h> 20 - #include <asm/txx9irq.h> 21 - #include <asm/txx9tmr.h> 22 - #include <asm/txx9pio.h> 23 - #include <asm/txx9/generic.h> 24 - #include <asm/txx9/tx3927.h> 25 - 26 - void __init tx3927_wdt_init(void) 27 - { 28 - txx9_wdt_init(TX3927_TMR_REG(2)); 29 - } 30 - 31 - void __init tx3927_setup(void) 32 - { 33 - int i; 34 - unsigned int conf; 35 - 36 - txx9_reg_res_init(TX3927_REV_PCODE(), TX3927_REG_BASE, 37 - TX3927_REG_SIZE); 38 - 39 - /* SDRAMC,ROMC are configured by PROM */ 40 - for (i = 0; i < 8; i++) { 41 - if (!(tx3927_romcptr->cr[i] & 0x8)) 42 - continue; /* disabled */ 43 - txx9_ce_res[i].start = (unsigned long)TX3927_ROMC_BA(i); 44 - txx9_ce_res[i].end = 45 - txx9_ce_res[i].start + TX3927_ROMC_SIZE(i) - 1; 46 - request_resource(&iomem_resource, &txx9_ce_res[i]); 47 - } 48 - 49 - /* clocks */ 50 - txx9_gbus_clock = txx9_cpu_clock / 2; 51 - /* change default value to udelay/mdelay take reasonable time */ 52 - loops_per_jiffy = txx9_cpu_clock / HZ / 2; 53 - 54 - /* CCFG */ 55 - /* enable Timeout BusError */ 56 - if (txx9_ccfg_toeon) 57 - tx3927_ccfgptr->ccfg |= TX3927_CCFG_TOE; 58 - 59 - /* clear BusErrorOnWrite flag */ 60 - tx3927_ccfgptr->ccfg &= ~TX3927_CCFG_BEOW; 61 - if (read_c0_conf() & TX39_CONF_WBON) 62 - /* Disable PCI snoop */ 63 - tx3927_ccfgptr->ccfg &= ~TX3927_CCFG_PSNP; 64 - else 65 - /* Enable PCI SNOOP - with write through only */ 66 - tx3927_ccfgptr->ccfg |= TX3927_CCFG_PSNP; 67 - /* do reset on watchdog */ 68 - tx3927_ccfgptr->ccfg |= TX3927_CCFG_WR; 69 - 70 - pr_info("TX3927 -- CRIR:%08lx CCFG:%08lx PCFG:%08lx\n", 71 - tx3927_ccfgptr->crir, tx3927_ccfgptr->ccfg, 72 - tx3927_ccfgptr->pcfg); 73 - 74 - /* TMR */ 75 - for (i = 0; i < TX3927_NR_TMR; i++) 76 - txx9_tmr_init(TX3927_TMR_REG(i)); 77 - 78 - /* DMA */ 79 - tx3927_dmaptr->mcr = 0; 80 - for (i = 0; i < ARRAY_SIZE(tx3927_dmaptr->ch); i++) { 81 - /* reset channel */ 82 - tx3927_dmaptr->ch[i].ccr = TX3927_DMA_CCR_CHRST; 83 - tx3927_dmaptr->ch[i].ccr = 0; 84 - } 85 - /* enable DMA */ 86 - #ifdef __BIG_ENDIAN 87 - tx3927_dmaptr->mcr = TX3927_DMA_MCR_MSTEN; 88 - #else 89 - tx3927_dmaptr->mcr = TX3927_DMA_MCR_MSTEN | TX3927_DMA_MCR_LE; 90 - #endif 91 - 92 - /* PIO */ 93 - __raw_writel(0, &tx3927_pioptr->maskcpu); 94 - __raw_writel(0, &tx3927_pioptr->maskext); 95 - 96 - conf = read_c0_conf(); 97 - if (conf & TX39_CONF_DCE) { 98 - if (!(conf & TX39_CONF_WBON)) 99 - pr_info("TX3927 D-Cache WriteThrough.\n"); 100 - else if (!(conf & TX39_CONF_CWFON)) 101 - pr_info("TX3927 D-Cache WriteBack.\n"); 102 - else 103 - pr_info("TX3927 D-Cache WriteBack (CWF) .\n"); 104 - } 105 - } 106 - 107 - void __init tx3927_time_init(unsigned int evt_tmrnr, unsigned int src_tmrnr) 108 - { 109 - txx9_clockevent_init(TX3927_TMR_REG(evt_tmrnr), 110 - TXX9_IRQ_BASE + TX3927_IR_TMR(evt_tmrnr), 111 - TXX9_IMCLK); 112 - txx9_clocksource_init(TX3927_TMR_REG(src_tmrnr), TXX9_IMCLK); 113 - } 114 - 115 - void __init tx3927_sio_init(unsigned int sclk, unsigned int cts_mask) 116 - { 117 - int i; 118 - 119 - for (i = 0; i < 2; i++) 120 - txx9_sio_init(TX3927_SIO_REG(i), 121 - TXX9_IRQ_BASE + TX3927_IR_SIO(i), 122 - i, sclk, (1 << i) & cts_mask); 123 - } 124 - 125 - void __init tx3927_mtd_init(int ch) 126 - { 127 - struct physmap_flash_data pdata = { 128 - .width = TX3927_ROMC_WIDTH(ch) / 8, 129 - }; 130 - unsigned long start = txx9_ce_res[ch].start; 131 - unsigned long size = txx9_ce_res[ch].end - start + 1; 132 - 133 - if (!(tx3927_romcptr->cr[ch] & 0x8)) 134 - return; /* disabled */ 135 - txx9_physmap_flash_init(ch, start, size, &pdata); 136 - }
-6
arch/mips/txx9/jmr3927/Makefile
··· 1 - # SPDX-License-Identifier: GPL-2.0-only 2 - # 3 - # Makefile for TOSHIBA JMR-TX3927 board 4 - # 5 - 6 - obj-y += prom.o irq.o setup.o
-128
arch/mips/txx9/jmr3927/irq.c
··· 1 - /* 2 - * Copyright 2001 MontaVista Software Inc. 3 - * Author: MontaVista Software, Inc. 4 - * ahennessy@mvista.com 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 - * Copyright (C) 2000-2001 Toshiba Corporation 11 - * 12 - * This program is free software; you can redistribute it and/or modify it 13 - * under the terms of the GNU General Public License as published by the 14 - * Free Software Foundation; either version 2 of the License, or (at your 15 - * option) any later version. 16 - * 17 - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED 18 - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 20 - * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 23 - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 24 - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 - * 28 - * You should have received a copy of the GNU General Public License along 29 - * with this program; if not, write to the Free Software Foundation, Inc., 30 - * 675 Mass Ave, Cambridge, MA 02139, USA. 31 - */ 32 - #include <linux/init.h> 33 - #include <linux/types.h> 34 - #include <linux/interrupt.h> 35 - #include <linux/irq.h> 36 - 37 - #include <asm/io.h> 38 - #include <asm/mipsregs.h> 39 - #include <asm/txx9/generic.h> 40 - #include <asm/txx9/jmr3927.h> 41 - 42 - #if JMR3927_IRQ_END > NR_IRQS 43 - #error JMR3927_IRQ_END > NR_IRQS 44 - #endif 45 - 46 - /* 47 - * CP0_STATUS is a thread's resource (saved/restored on context switch). 48 - * So disable_irq/enable_irq MUST handle IOC/IRC registers. 49 - */ 50 - static void mask_irq_ioc(struct irq_data *d) 51 - { 52 - /* 0: mask */ 53 - unsigned int irq_nr = d->irq - JMR3927_IRQ_IOC; 54 - unsigned char imask = jmr3927_ioc_reg_in(JMR3927_IOC_INTM_ADDR); 55 - unsigned int bit = 1 << irq_nr; 56 - jmr3927_ioc_reg_out(imask & ~bit, JMR3927_IOC_INTM_ADDR); 57 - /* flush write buffer */ 58 - (void)jmr3927_ioc_reg_in(JMR3927_IOC_REV_ADDR); 59 - } 60 - static void unmask_irq_ioc(struct irq_data *d) 61 - { 62 - /* 0: mask */ 63 - unsigned int irq_nr = d->irq - JMR3927_IRQ_IOC; 64 - unsigned char imask = jmr3927_ioc_reg_in(JMR3927_IOC_INTM_ADDR); 65 - unsigned int bit = 1 << irq_nr; 66 - jmr3927_ioc_reg_out(imask | bit, JMR3927_IOC_INTM_ADDR); 67 - /* flush write buffer */ 68 - (void)jmr3927_ioc_reg_in(JMR3927_IOC_REV_ADDR); 69 - } 70 - 71 - static int jmr3927_ioc_irqroute(void) 72 - { 73 - unsigned char istat = jmr3927_ioc_reg_in(JMR3927_IOC_INTS2_ADDR); 74 - int i; 75 - 76 - for (i = 0; i < JMR3927_NR_IRQ_IOC; i++) { 77 - if (istat & (1 << i)) 78 - return JMR3927_IRQ_IOC + i; 79 - } 80 - return -1; 81 - } 82 - 83 - static int jmr3927_irq_dispatch(int pending) 84 - { 85 - int irq; 86 - 87 - if ((pending & CAUSEF_IP7) == 0) 88 - return -1; 89 - irq = (pending >> CAUSEB_IP2) & 0x0f; 90 - irq += JMR3927_IRQ_IRC; 91 - if (irq == JMR3927_IRQ_IOCINT) 92 - irq = jmr3927_ioc_irqroute(); 93 - return irq; 94 - } 95 - 96 - static struct irq_chip jmr3927_irq_ioc = { 97 - .name = "jmr3927_ioc", 98 - .irq_mask = mask_irq_ioc, 99 - .irq_unmask = unmask_irq_ioc, 100 - }; 101 - 102 - void __init jmr3927_irq_setup(void) 103 - { 104 - int i; 105 - 106 - txx9_irq_dispatch = jmr3927_irq_dispatch; 107 - /* Now, interrupt control disabled, */ 108 - /* all IRC interrupts are masked, */ 109 - /* all IRC interrupt mode are Low Active. */ 110 - 111 - /* mask all IOC interrupts */ 112 - jmr3927_ioc_reg_out(0, JMR3927_IOC_INTM_ADDR); 113 - /* setup IOC interrupt mode (SOFT:High Active, Others:Low Active) */ 114 - jmr3927_ioc_reg_out(JMR3927_IOC_INTF_SOFT, JMR3927_IOC_INTP_ADDR); 115 - 116 - /* clear PCI Soft interrupts */ 117 - jmr3927_ioc_reg_out(0, JMR3927_IOC_INTS1_ADDR); 118 - /* clear PCI Reset interrupts */ 119 - jmr3927_ioc_reg_out(0, JMR3927_IOC_RESET_ADDR); 120 - 121 - tx3927_irq_init(); 122 - for (i = JMR3927_IRQ_IOC; i < JMR3927_IRQ_IOC + JMR3927_NR_IRQ_IOC; i++) 123 - irq_set_chip_and_handler(i, &jmr3927_irq_ioc, 124 - handle_level_irq); 125 - 126 - /* setup IOC interrupt 1 (PCI, MODEM) */ 127 - irq_set_chained_handler(JMR3927_IRQ_IOCINT, handle_simple_irq); 128 - }
-52
arch/mips/txx9/jmr3927/prom.c
··· 1 - /* 2 - * BRIEF MODULE DESCRIPTION 3 - * PROM library initialisation code, assuming a version of 4 - * pmon is the boot code. 5 - * 6 - * Copyright 2001 MontaVista Software Inc. 7 - * Author: MontaVista Software, Inc. 8 - * ahennessy@mvista.com 9 - * 10 - * Based on arch/mips/au1000/common/prom.c 11 - * 12 - * This file was derived from Carsten Langgaard's 13 - * arch/mips/mips-boards/xx files. 14 - * 15 - * Carsten Langgaard, carstenl@mips.com 16 - * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved. 17 - * 18 - * This program is free software; you can redistribute it and/or modify it 19 - * under the terms of the GNU General Public License as published by the 20 - * Free Software Foundation; either version 2 of the License, or (at your 21 - * option) any later version. 22 - * 23 - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED 24 - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 26 - * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 27 - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 28 - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 29 - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 30 - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 32 - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 - * 34 - * You should have received a copy of the GNU General Public License along 35 - * with this program; if not, write to the Free Software Foundation, Inc., 36 - * 675 Mass Ave, Cambridge, MA 02139, USA. 37 - */ 38 - #include <linux/init.h> 39 - #include <linux/kernel.h> 40 - #include <linux/memblock.h> 41 - #include <asm/txx9/generic.h> 42 - #include <asm/txx9/jmr3927.h> 43 - 44 - void __init jmr3927_prom_init(void) 45 - { 46 - /* CCFG */ 47 - if ((tx3927_ccfgptr->ccfg & TX3927_CCFG_TLBOFF) == 0) 48 - pr_err("TX3927 TLB off\n"); 49 - 50 - memblock_add(0, JMR3927_SDRAM_SIZE); 51 - txx9_sio_putchar_init(TX3927_SIO_REG(1)); 52 - }
-223
arch/mips/txx9/jmr3927/setup.c
··· 1 - /* 2 - * This program is free software; you can redistribute it and/or modify it 3 - * under the terms of the GNU General Public License as published by the 4 - * Free Software Foundation; either version 2 of the License, or (at your 5 - * option) any later version. 6 - * 7 - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED 8 - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 9 - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 10 - * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 11 - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 12 - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 13 - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 14 - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 15 - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 16 - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 17 - * 18 - * You should have received a copy of the GNU General Public License along 19 - * with this program; if not, write to the Free Software Foundation, Inc., 20 - * 675 Mass Ave, Cambridge, MA 02139, USA. 21 - * 22 - * Copyright 2001 MontaVista Software Inc. 23 - * Author: MontaVista Software, Inc. 24 - * ahennessy@mvista.com 25 - * 26 - * Copyright (C) 2000-2001 Toshiba Corporation 27 - * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org) 28 - */ 29 - 30 - #include <linux/init.h> 31 - #include <linux/kernel.h> 32 - #include <linux/types.h> 33 - #include <linux/ioport.h> 34 - #include <linux/delay.h> 35 - #include <linux/platform_device.h> 36 - #include <linux/gpio.h> 37 - #include <asm/reboot.h> 38 - #include <asm/txx9pio.h> 39 - #include <asm/txx9/generic.h> 40 - #include <asm/txx9/pci.h> 41 - #include <asm/txx9/jmr3927.h> 42 - #include <asm/mipsregs.h> 43 - 44 - static void jmr3927_machine_restart(char *command) 45 - { 46 - local_irq_disable(); 47 - #if 1 /* Resetting PCI bus */ 48 - jmr3927_ioc_reg_out(0, JMR3927_IOC_RESET_ADDR); 49 - jmr3927_ioc_reg_out(JMR3927_IOC_RESET_PCI, JMR3927_IOC_RESET_ADDR); 50 - (void)jmr3927_ioc_reg_in(JMR3927_IOC_RESET_ADDR); /* flush WB */ 51 - mdelay(1); 52 - jmr3927_ioc_reg_out(0, JMR3927_IOC_RESET_ADDR); 53 - #endif 54 - jmr3927_ioc_reg_out(JMR3927_IOC_RESET_CPU, JMR3927_IOC_RESET_ADDR); 55 - /* fallback */ 56 - (*_machine_halt)(); 57 - } 58 - 59 - static void __init jmr3927_time_init(void) 60 - { 61 - tx3927_time_init(0, 1); 62 - } 63 - 64 - #define DO_WRITE_THROUGH 65 - 66 - static void jmr3927_board_init(void); 67 - 68 - static void __init jmr3927_mem_setup(void) 69 - { 70 - set_io_port_base(JMR3927_PORT_BASE + JMR3927_PCIIO); 71 - 72 - _machine_restart = jmr3927_machine_restart; 73 - 74 - /* cache setup */ 75 - { 76 - unsigned int conf; 77 - #ifdef DO_WRITE_THROUGH 78 - int mips_config_cwfon = 0; 79 - int mips_config_wbon = 0; 80 - #else 81 - int mips_config_cwfon = 1; 82 - int mips_config_wbon = 1; 83 - #endif 84 - 85 - conf = read_c0_conf(); 86 - conf &= ~(TX39_CONF_WBON | TX39_CONF_CWFON); 87 - conf |= mips_config_wbon ? TX39_CONF_WBON : 0; 88 - conf |= mips_config_cwfon ? TX39_CONF_CWFON : 0; 89 - 90 - write_c0_conf(conf); 91 - write_c0_cache(0); 92 - } 93 - 94 - /* initialize board */ 95 - jmr3927_board_init(); 96 - 97 - tx3927_sio_init(0, 1 << 1); /* ch1: noCTS */ 98 - } 99 - 100 - static void __init jmr3927_pci_setup(void) 101 - { 102 - #ifdef CONFIG_PCI 103 - int extarb = !(tx3927_ccfgptr->ccfg & TX3927_CCFG_PCIXARB); 104 - struct pci_controller *c; 105 - 106 - c = txx9_alloc_pci_controller(&txx9_primary_pcic, 107 - JMR3927_PCIMEM, JMR3927_PCIMEM_SIZE, 108 - JMR3927_PCIIO, JMR3927_PCIIO_SIZE); 109 - register_pci_controller(c); 110 - if (!extarb) { 111 - /* Reset PCI Bus */ 112 - jmr3927_ioc_reg_out(0, JMR3927_IOC_RESET_ADDR); 113 - udelay(100); 114 - jmr3927_ioc_reg_out(JMR3927_IOC_RESET_PCI, 115 - JMR3927_IOC_RESET_ADDR); 116 - udelay(100); 117 - jmr3927_ioc_reg_out(0, JMR3927_IOC_RESET_ADDR); 118 - } 119 - tx3927_pcic_setup(c, JMR3927_SDRAM_SIZE, extarb); 120 - tx3927_setup_pcierr_irq(); 121 - #endif /* CONFIG_PCI */ 122 - } 123 - 124 - static void __init jmr3927_board_init(void) 125 - { 126 - txx9_cpu_clock = JMR3927_CORECLK; 127 - /* SDRAMC are configured by PROM */ 128 - 129 - /* ROMC */ 130 - tx3927_romcptr->cr[1] = JMR3927_ROMCE1 | 0x00030048; 131 - tx3927_romcptr->cr[2] = JMR3927_ROMCE2 | 0x000064c8; 132 - tx3927_romcptr->cr[3] = JMR3927_ROMCE3 | 0x0003f698; 133 - tx3927_romcptr->cr[5] = JMR3927_ROMCE5 | 0x0000f218; 134 - 135 - /* Pin selection */ 136 - tx3927_ccfgptr->pcfg &= ~TX3927_PCFG_SELALL; 137 - tx3927_ccfgptr->pcfg |= 138 - TX3927_PCFG_SELSIOC(0) | TX3927_PCFG_SELSIO_ALL | 139 - (TX3927_PCFG_SELDMA_ALL & ~TX3927_PCFG_SELDMA(1)); 140 - 141 - tx3927_setup(); 142 - 143 - /* PIO[15:12] connected to LEDs */ 144 - __raw_writel(0x0000f000, &tx3927_pioptr->dir); 145 - 146 - jmr3927_pci_setup(); 147 - 148 - /* SIO0 DTR on */ 149 - jmr3927_ioc_reg_out(0, JMR3927_IOC_DTR_ADDR); 150 - 151 - jmr3927_led_set(0); 152 - 153 - pr_info("JMR-TX3927 (Rev %d) --- IOC(Rev %d) DIPSW:%d,%d,%d,%d\n", 154 - jmr3927_ioc_reg_in(JMR3927_IOC_BREV_ADDR) & JMR3927_REV_MASK, 155 - jmr3927_ioc_reg_in(JMR3927_IOC_REV_ADDR) & JMR3927_REV_MASK, 156 - jmr3927_dipsw1(), jmr3927_dipsw2(), 157 - jmr3927_dipsw3(), jmr3927_dipsw4()); 158 - } 159 - 160 - /* This trick makes rtc-ds1742 driver usable as is. */ 161 - static unsigned long jmr3927_swizzle_addr_b(unsigned long port) 162 - { 163 - if ((port & 0xffff0000) != JMR3927_IOC_NVRAMB_ADDR) 164 - return port; 165 - port = (port & 0xffff0000) | (port & 0x7fff << 1); 166 - #ifdef __BIG_ENDIAN 167 - return port; 168 - #else 169 - return port | 1; 170 - #endif 171 - } 172 - 173 - static void __init jmr3927_rtc_init(void) 174 - { 175 - static struct resource __initdata res = { 176 - .start = JMR3927_IOC_NVRAMB_ADDR - IO_BASE, 177 - .end = JMR3927_IOC_NVRAMB_ADDR - IO_BASE + 0x800 - 1, 178 - .flags = IORESOURCE_MEM, 179 - }; 180 - platform_device_register_simple("rtc-ds1742", -1, &res, 1); 181 - } 182 - 183 - static void __init jmr3927_mtd_init(void) 184 - { 185 - int i; 186 - 187 - for (i = 0; i < 2; i++) 188 - tx3927_mtd_init(i); 189 - } 190 - 191 - static void __init jmr3927_device_init(void) 192 - { 193 - unsigned long iocled_base = JMR3927_IOC_LED_ADDR - IO_BASE; 194 - #ifdef __LITTLE_ENDIAN 195 - iocled_base |= 1; 196 - #endif 197 - __swizzle_addr_b = jmr3927_swizzle_addr_b; 198 - jmr3927_rtc_init(); 199 - tx3927_wdt_init(); 200 - jmr3927_mtd_init(); 201 - txx9_iocled_init(iocled_base, -1, 8, 1, "green", NULL); 202 - } 203 - 204 - static void __init jmr3927_arch_init(void) 205 - { 206 - txx9_gpio_init(TX3927_PIO_REG, 0, 16); 207 - 208 - gpio_request(11, "dipsw1"); 209 - gpio_request(10, "dipsw2"); 210 - } 211 - 212 - struct txx9_board_vec jmr3927_vec __initdata = { 213 - .system = "Toshiba JMR_TX3927", 214 - .prom_init = jmr3927_prom_init, 215 - .mem_setup = jmr3927_mem_setup, 216 - .irq_setup = jmr3927_irq_setup, 217 - .time_init = jmr3927_time_init, 218 - .device_init = jmr3927_device_init, 219 - .arch_init = jmr3927_arch_init, 220 - #ifdef CONFIG_PCI 221 - .pci_map_irq = jmr3927_pci_map_irq, 222 - #endif 223 - };
+1 -1
drivers/dma/Kconfig
··· 623 623 624 624 config TXX9_DMAC 625 625 tristate "Toshiba TXx9 SoC DMA support" 626 - depends on MACH_TX49XX || MACH_TX39XX 626 + depends on MACH_TX49XX 627 627 select DMA_ENGINE 628 628 help 629 629 Support the TXx9 SoC internal DMA controller. This can be
+1 -1
drivers/watchdog/Kconfig
··· 1718 1718 1719 1719 config TXX9_WDT 1720 1720 tristate "Toshiba TXx9 Watchdog Timer" 1721 - depends on CPU_TX39XX || CPU_TX49XX || (MIPS && COMPILE_TEST) 1721 + depends on CPU_TX49XX || (MIPS && COMPILE_TEST) 1722 1722 select WATCHDOG_CORE 1723 1723 help 1724 1724 Hardware driver for the built-in watchdog timer on TXx9 MIPS SoCs.