Commit 9a8b3d5f authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'mips_5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux

Pull MIPS updates from Thomas Bogendoerfer:

 - added support for QCN550x (ath79)

 - enabled KCSAN

 - removed TX39XX support

 - various cleanups and fixes

* tag 'mips_5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (31 commits)
  MIPS: Fix build error for loongson64 and sgi-ip27
  MIPS: ingenic: correct unit node address
  MIPS: Fix wrong comments in asm/prom.h
  MIPS: Remove redundant definitions of device_tree_init()
  MIPS: Remove redundant check in device_tree_init()
  MIPS: pgalloc: fix memory leak caused by pgd_free()
  MIPS: RB532: fix return value of __setup handler
  MIPS: Only use current_stack_pointer on GCC
  MIPS: boot/compressed: Use array reference for image bounds
  mips: cdmm: Fix refcount leak in mips_cdmm_phys_base
  mips: remove reference to "newer Loongson-3"
  mips: Always permit to build u-boot images
  MIPS: Sanitise Cavium switch cases in TLB handler synthesizers
  DEC: Limit PMAX memory probing to R3k systems
  mips: DEC: honor CONFIG_MIPS_FP_SUPPORT=n
  MIPS: fix fortify panic when copying asm exception handlers
  mips: ralink: fix a refcount leak in ill_acc_of_setup()
  mips: Implement "current_stack_pointer"
  MIPS: Remove TX39XX support
  MIPS: Modernize READ_IMPLIES_EXEC
  ...
parents 34af78c4 f8f9f21c
...@@ -32,7 +32,6 @@ platform-$(CONFIG_SIBYTE_SB1250) += sibyte/ ...@@ -32,7 +32,6 @@ platform-$(CONFIG_SIBYTE_SB1250) += sibyte/
platform-$(CONFIG_SIBYTE_BCM1x55) += sibyte/ platform-$(CONFIG_SIBYTE_BCM1x55) += sibyte/
platform-$(CONFIG_SIBYTE_BCM1x80) += sibyte/ platform-$(CONFIG_SIBYTE_BCM1x80) += sibyte/
platform-$(CONFIG_SNI_RM) += sni/ platform-$(CONFIG_SNI_RM) += sni/
platform-$(CONFIG_MACH_TX39XX) += txx9/
platform-$(CONFIG_MACH_TX49XX) += txx9/ platform-$(CONFIG_MACH_TX49XX) += txx9/
platform-$(CONFIG_MACH_VR41XX) += vr41xx/ platform-$(CONFIG_MACH_VR41XX) += vr41xx/
......
...@@ -4,6 +4,7 @@ config MIPS ...@@ -4,6 +4,7 @@ config MIPS
default y default y
select ARCH_32BIT_OFF_T if !64BIT select ARCH_32BIT_OFF_T if !64BIT
select ARCH_BINFMT_ELF_STATE if MIPS_FP_SUPPORT select ARCH_BINFMT_ELF_STATE if MIPS_FP_SUPPORT
select ARCH_HAS_CURRENT_STACK_POINTER if !CC_IS_CLANG || CLANG_VERSION >= 140000
select ARCH_HAS_DEBUG_VIRTUAL if !64BIT select ARCH_HAS_DEBUG_VIRTUAL if !64BIT
select ARCH_HAS_FORTIFY_SOURCE select ARCH_HAS_FORTIFY_SOURCE
select ARCH_HAS_KCOV select ARCH_HAS_KCOV
...@@ -101,6 +102,7 @@ config MIPS ...@@ -101,6 +102,7 @@ config MIPS
select TRACE_IRQFLAGS_SUPPORT select TRACE_IRQFLAGS_SUPPORT
select VIRT_TO_BUS select VIRT_TO_BUS
select ARCH_HAS_ELFCORE_COMPAT select ARCH_HAS_ELFCORE_COMPAT
select HAVE_ARCH_KCSAN if 64BIT
config MIPS_FIXUP_BIGPHYS_ADDR config MIPS_FIXUP_BIGPHYS_ADDR
bool bool
...@@ -511,6 +513,7 @@ config MACH_LOONGSON64 ...@@ -511,6 +513,7 @@ config MACH_LOONGSON64
select USE_OF select USE_OF
select BUILTIN_DTB select BUILTIN_DTB
select PCI_HOST_GENERIC select PCI_HOST_GENERIC
select HAVE_ARCH_NODEDATA_EXTENSION if NUMA
help help
This enables the support of Loongson-2/3 family of machines. This enables the support of Loongson-2/3 family of machines.
...@@ -707,6 +710,7 @@ config SGI_IP27 ...@@ -707,6 +710,7 @@ config SGI_IP27
select WAR_R10000_LLSC select WAR_R10000_LLSC
select MIPS_L1_CACHE_SHIFT_7 select MIPS_L1_CACHE_SHIFT_7
select NUMA select NUMA
select HAVE_ARCH_NODEDATA_EXTENSION
help help
This are the SGI Origin 200, Origin 2000 and Onyx 2 Graphics This are the SGI Origin 200, Origin 2000 and Onyx 2 Graphics
workstations. To compile a Linux kernel that runs on these, say Y workstations. To compile a Linux kernel that runs on these, say Y
...@@ -926,9 +930,6 @@ config SNI_RM ...@@ -926,9 +930,6 @@ config SNI_RM
Technology and now in turn merged with Fujitsu. Say Y here to Technology and now in turn merged with Fujitsu. Say Y here to
support this machine type. support this machine type.
config MACH_TX39XX
bool "Toshiba TX39 series based machines"
config MACH_TX49XX config MACH_TX49XX
bool "Toshiba TX49 series based machines" bool "Toshiba TX49 series based machines"
select WAR_TX49XX_ICACHE_INDEX_INV select WAR_TX49XX_ICACHE_INDEX_INV
...@@ -1343,19 +1344,14 @@ config LOONGSON3_ENHANCEMENT ...@@ -1343,19 +1344,14 @@ config LOONGSON3_ENHANCEMENT
new Loongson-3 machines only, please say 'Y' here. new Loongson-3 machines only, please say 'Y' here.
config CPU_LOONGSON3_WORKAROUNDS config CPU_LOONGSON3_WORKAROUNDS
bool "Old Loongson-3 LLSC Workarounds" bool "Loongson-3 LLSC Workarounds"
default y if SMP default y if SMP
depends on CPU_LOONGSON64 depends on CPU_LOONGSON64
help help
Loongson-3 processors have the llsc issues which require workarounds. Loongson-3 processors have the llsc issues which require workarounds.
Without workarounds the system may hang unexpectedly. Without workarounds the system may hang unexpectedly.
Newer Loongson-3 will fix these issues and no workarounds are needed. Say Y, unless you know what you are doing.
The workarounds have no significant side effect on them but may
decrease the performance of the system so this option should be
disabled unless the kernel is intended to be run on old systems.
If unsure, please say Y.
config CPU_LOONGSON3_CPUCFG_EMULATION config CPU_LOONGSON3_CPUCFG_EMULATION
bool "Emulate the CPUCFG instruction on older Loongson cores" bool "Emulate the CPUCFG instruction on older Loongson cores"
...@@ -1583,12 +1579,6 @@ config CPU_R3000 ...@@ -1583,12 +1579,6 @@ config CPU_R3000
might be a safe bet. If the resulting kernel does not work, might be a safe bet. If the resulting kernel does not work,
try to recompile with R3000. try to recompile with R3000.
config CPU_TX39XX
bool "R39XX"
depends on SYS_HAS_CPU_TX39XX
select CPU_SUPPORTS_32BIT_KERNEL
select CPU_R3K_TLB
config CPU_VR41XX config CPU_VR41XX
bool "R41xx" bool "R41xx"
depends on SYS_HAS_CPU_VR41XX depends on SYS_HAS_CPU_VR41XX
...@@ -1915,9 +1905,6 @@ config SYS_HAS_CPU_P5600 ...@@ -1915,9 +1905,6 @@ config SYS_HAS_CPU_P5600
config SYS_HAS_CPU_R3000 config SYS_HAS_CPU_R3000
bool bool
config SYS_HAS_CPU_TX39XX
bool
config SYS_HAS_CPU_VR41XX config SYS_HAS_CPU_VR41XX
bool bool
...@@ -2148,7 +2135,7 @@ config PAGE_SIZE_8KB ...@@ -2148,7 +2135,7 @@ config PAGE_SIZE_8KB
config PAGE_SIZE_16KB config PAGE_SIZE_16KB
bool "16kB" bool "16kB"
depends on !CPU_R3000 && !CPU_TX39XX depends on !CPU_R3000
help help
Using 16kB page size will result in higher performance kernel at Using 16kB page size will result in higher performance kernel at
the price of higher memory consumption. This option is available on the price of higher memory consumption. This option is available on
...@@ -2167,7 +2154,7 @@ config PAGE_SIZE_32KB ...@@ -2167,7 +2154,7 @@ config PAGE_SIZE_32KB
config PAGE_SIZE_64KB config PAGE_SIZE_64KB
bool "64kB" bool "64kB"
depends on !CPU_R3000 && !CPU_TX39XX depends on !CPU_R3000
help help
Using 64kB page size will result in higher performance kernel at Using 64kB page size will result in higher performance kernel at
the price of higher memory consumption. This option is available on the price of higher memory consumption. This option is available on
...@@ -2235,7 +2222,7 @@ config CPU_HAS_PREFETCH ...@@ -2235,7 +2222,7 @@ config CPU_HAS_PREFETCH
config CPU_GENERIC_DUMP_TLB config CPU_GENERIC_DUMP_TLB
bool bool
default y if !(CPU_R3000 || CPU_TX39XX) default y if !CPU_R3000
config MIPS_FP_SUPPORT config MIPS_FP_SUPPORT
bool "Floating Point support" if EXPERT bool "Floating Point support" if EXPERT
...@@ -2255,7 +2242,7 @@ config MIPS_FP_SUPPORT ...@@ -2255,7 +2242,7 @@ config MIPS_FP_SUPPORT
config CPU_R2300_FPU config CPU_R2300_FPU
bool bool
depends on MIPS_FP_SUPPORT depends on MIPS_FP_SUPPORT
default y if CPU_R3000 || CPU_TX39XX default y if CPU_R3000
config CPU_R3K_TLB config CPU_R3K_TLB
bool bool
...@@ -2520,13 +2507,51 @@ config CPU_HAS_SYNC ...@@ -2520,13 +2507,51 @@ config CPU_HAS_SYNC
# #
# CPU non-features # CPU non-features
# #
# Work around the "daddi" and "daddiu" CPU errata:
#
# - The `daddi' instruction fails to trap on overflow.
# "MIPS R4000PC/SC Errata, Processor Revision 2.2 and 3.0",
# erratum #23
#
# - The `daddiu' instruction can produce an incorrect result.
# "MIPS R4000PC/SC Errata, Processor Revision 2.2 and 3.0",
# erratum #41
# "MIPS R4000MC Errata, Processor Revision 2.2 and 3.0", erratum
# #15
# "MIPS R4400PC/SC Errata, Processor Revision 1.0", erratum #7
# "MIPS R4400MC Errata, Processor Revision 1.0", erratum #5
config CPU_DADDI_WORKAROUNDS config CPU_DADDI_WORKAROUNDS
bool bool
# Work around certain R4000 CPU errata (as implemented by GCC):
#
# - A double-word or a variable shift may give an incorrect result
# if executed immediately after starting an integer division:
# "MIPS R4000PC/SC Errata, Processor Revision 2.2 and 3.0",
# erratum #28
# "MIPS R4000MC Errata, Processor Revision 2.2 and 3.0", erratum
# #19
#
# - A double-word or a variable shift may give an incorrect result
# if executed while an integer multiplication is in progress:
# "MIPS R4000PC/SC Errata, Processor Revision 2.2 and 3.0",
# errata #16 & #28
#
# - An integer division may give an incorrect result if started in
# a delay slot of a taken branch or a jump:
# "MIPS R4000PC/SC Errata, Processor Revision 2.2 and 3.0",
# erratum #52
config CPU_R4000_WORKAROUNDS config CPU_R4000_WORKAROUNDS
bool bool
select CPU_R4400_WORKAROUNDS select CPU_R4400_WORKAROUNDS
# Work around certain R4400 CPU errata (as implemented by GCC):
#
# - A double-word or a variable shift may give an incorrect result
# if executed immediately after starting an integer division:
# "MIPS R4400MC Errata, Processor Revision 1.0", erratum #10
# "MIPS R4400MC Errata, Processor Revision 2.0 & 3.0", erratum #4
config CPU_R4400_WORKAROUNDS config CPU_R4400_WORKAROUNDS
bool bool
...@@ -2536,13 +2561,13 @@ config CPU_R4X00_BUGS64 ...@@ -2536,13 +2561,13 @@ config CPU_R4X00_BUGS64
config MIPS_ASID_SHIFT config MIPS_ASID_SHIFT
int int
default 6 if CPU_R3000 || CPU_TX39XX default 6 if CPU_R3000
default 0 default 0
config MIPS_ASID_BITS config MIPS_ASID_BITS
int int
default 0 if MIPS_ASID_BITS_VARIABLE default 0 if MIPS_ASID_BITS_VARIABLE
default 6 if CPU_R3000 || CPU_TX39XX default 6 if CPU_R3000
default 8 default 8
config MIPS_ASID_BITS_VARIABLE config MIPS_ASID_BITS_VARIABLE
...@@ -2685,6 +2710,9 @@ config NUMA ...@@ -2685,6 +2710,9 @@ config NUMA
config SYS_SUPPORTS_NUMA config SYS_SUPPORTS_NUMA
bool bool
config HAVE_ARCH_NODEDATA_EXTENSION
bool
config RELOCATABLE config RELOCATABLE
bool "Relocatable kernel" bool "Relocatable kernel"
depends on SYS_SUPPORTS_RELOCATABLE depends on SYS_SUPPORTS_RELOCATABLE
...@@ -3202,6 +3230,10 @@ config MIPS32_N32 ...@@ -3202,6 +3230,10 @@ config MIPS32_N32
If unsure, say N. If unsure, say N.
config CC_HAS_MNO_BRANCH_LIKELY
def_bool y
depends on $(cc-option,-mno-branch-likely)
menu "Power management options" menu "Power management options"
config ARCH_HIBERNATION_POSSIBLE config ARCH_HIBERNATION_POSSIBLE
......
...@@ -158,7 +158,6 @@ cflags-y += $(call as-option,-Wa$(comma)-mno-fix-loongson3-llsc,) ...@@ -158,7 +158,6 @@ cflags-y += $(call as-option,-Wa$(comma)-mno-fix-loongson3-llsc,)
# CPU-dependent compiler/assembler options for optimization. # CPU-dependent compiler/assembler options for optimization.
# #
cflags-$(CONFIG_CPU_R3000) += -march=r3000 cflags-$(CONFIG_CPU_R3000) += -march=r3000
cflags-$(CONFIG_CPU_TX39XX) += -march=r3900
cflags-$(CONFIG_CPU_R4300) += -march=r4300 -Wa,--trap cflags-$(CONFIG_CPU_R4300) += -march=r4300 -Wa,--trap
cflags-$(CONFIG_CPU_VR41XX) += -march=r4100 -Wa,--trap cflags-$(CONFIG_CPU_VR41XX) += -march=r4100 -Wa,--trap
cflags-$(CONFIG_CPU_R4X00) += -march=r4600 -Wa,--trap cflags-$(CONFIG_CPU_R4X00) += -march=r4600 -Wa,--trap
...@@ -340,14 +339,12 @@ drivers-$(CONFIG_PM) += arch/mips/power/ ...@@ -340,14 +339,12 @@ drivers-$(CONFIG_PM) += arch/mips/power/
boot-y := vmlinux.bin boot-y := vmlinux.bin
boot-y += vmlinux.ecoff boot-y += vmlinux.ecoff
boot-y += vmlinux.srec boot-y += vmlinux.srec
ifeq ($(shell expr $(load-y) \< 0xffffffff80000000 2> /dev/null), 0)
boot-y += uImage boot-y += uImage
boot-y += uImage.bin boot-y += uImage.bin
boot-y += uImage.bz2 boot-y += uImage.bz2
boot-y += uImage.gz boot-y += uImage.gz
boot-y += uImage.lzma boot-y += uImage.lzma
boot-y += uImage.lzo boot-y += uImage.lzo
endif
boot-y += vmlinux.itb boot-y += vmlinux.itb
boot-y += vmlinux.gz.itb boot-y += vmlinux.gz.itb
boot-y += vmlinux.bz2.itb boot-y += vmlinux.bz2.itb
...@@ -359,9 +356,7 @@ bootz-y := vmlinuz ...@@ -359,9 +356,7 @@ bootz-y := vmlinuz
bootz-y += vmlinuz.bin bootz-y += vmlinuz.bin
bootz-y += vmlinuz.ecoff bootz-y += vmlinuz.ecoff
bootz-y += vmlinuz.srec bootz-y += vmlinuz.srec
ifeq ($(shell expr $(zload-y) \< 0xffffffff80000000 2> /dev/null), 0)
bootz-y += uzImage.bin bootz-y += uzImage.bin
endif
bootz-y += vmlinuz.itb bootz-y += vmlinuz.itb
# #
......
...@@ -112,7 +112,7 @@ static int ar2315_misc_irq_map(struct irq_domain *d, unsigned irq, ...@@ -112,7 +112,7 @@ static int ar2315_misc_irq_map(struct irq_domain *d, unsigned irq,
return 0; return 0;
} }
static struct irq_domain_ops ar2315_misc_irq_domain_ops = { static const struct irq_domain_ops ar2315_misc_irq_domain_ops = {
.map = ar2315_misc_irq_map, .map = ar2315_misc_irq_map,
}; };
......
...@@ -116,7 +116,7 @@ static int ar5312_misc_irq_map(struct irq_domain *d, unsigned irq, ...@@ -116,7 +116,7 @@ static int ar5312_misc_irq_map(struct irq_domain *d, unsigned irq,
return 0; return 0;
} }
static struct irq_domain_ops ar5312_misc_irq_domain_ops = { static const struct irq_domain_ops ar5312_misc_irq_domain_ops = {
.map = ar5312_misc_irq_map, .map = ar5312_misc_irq_map,
}; };
......
...@@ -121,6 +121,7 @@ static void prom_putchar_init(void) ...@@ -121,6 +121,7 @@ static void prom_putchar_init(void)
case REV_ID_MAJOR_QCA9558: case REV_ID_MAJOR_QCA9558:
case REV_ID_MAJOR_TP9343: case REV_ID_MAJOR_TP9343:
case REV_ID_MAJOR_QCA956X: case REV_ID_MAJOR_QCA956X:
case REV_ID_MAJOR_QCN550X:
_prom_putchar = prom_putchar_ar71xx; _prom_putchar = prom_putchar_ar71xx;
break; break;
......
...@@ -168,6 +168,12 @@ static void __init ath79_detect_sys_type(void) ...@@ -168,6 +168,12 @@ static void __init ath79_detect_sys_type(void)
rev = id & QCA956X_REV_ID_REVISION_MASK; rev = id & QCA956X_REV_ID_REVISION_MASK;
break; break;
case REV_ID_MAJOR_QCN550X:
ath79_soc = ATH79_SOC_QCA956X;
chip = "550X";
rev = id & QCA956X_REV_ID_REVISION_MASK;
break;
case REV_ID_MAJOR_TP9343: case REV_ID_MAJOR_TP9343:
ath79_soc = ATH79_SOC_TP9343; ath79_soc = ATH79_SOC_TP9343;
chip = "9343"; chip = "9343";
...@@ -263,8 +269,3 @@ void __init arch_init_irq(void) ...@@ -263,8 +269,3 @@ void __init arch_init_irq(void)
{ {
irqchip_init(); irqchip_init();
} }
void __init device_tree_init(void)
{
unflatten_and_copy_device_tree();
}
...@@ -38,6 +38,7 @@ KBUILD_AFLAGS := $(KBUILD_AFLAGS) -D__ASSEMBLY__ \ ...@@ -38,6 +38,7 @@ KBUILD_AFLAGS := $(KBUILD_AFLAGS) -D__ASSEMBLY__ \
KCOV_INSTRUMENT := n KCOV_INSTRUMENT := n
GCOV_PROFILE := n GCOV_PROFILE := n
UBSAN_SANITIZE := n UBSAN_SANITIZE := n
KCSAN_SANITIZE := n
# decompressor objects (linked with vmlinuz) # decompressor objects (linked with vmlinuz)
vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o $(obj)/bswapsi.o vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o $(obj)/bswapsi.o
......
...@@ -26,7 +26,7 @@ unsigned long free_mem_ptr; ...@@ -26,7 +26,7 @@ unsigned long free_mem_ptr;
unsigned long free_mem_end_ptr; unsigned long free_mem_end_ptr;
/* The linker tells us where the image is. */ /* The linker tells us where the image is. */
extern unsigned char __image_begin, __image_end; extern unsigned char __image_begin[], __image_end[];
/* debug interfaces */ /* debug interfaces */
#ifdef CONFIG_DEBUG_ZBOOT #ifdef CONFIG_DEBUG_ZBOOT
...@@ -91,9 +91,9 @@ void decompress_kernel(unsigned long boot_heap_start) ...@@ -91,9 +91,9 @@ void decompress_kernel(unsigned long boot_heap_start)
{ {
unsigned long zimage_start, zimage_size; unsigned long zimage_start, zimage_size;
zimage_start = (unsigned long)(&__image_begin); zimage_start = (unsigned long)(__image_begin);
zimage_size = (unsigned long)(&__image_end) - zimage_size = (unsigned long)(__image_end) -
(unsigned long)(&__image_begin); (unsigned long)(__image_begin);
puts("zimage at: "); puts("zimage at: ");
puthex(zimage_start); puthex(zimage_start);
...@@ -121,7 +121,7 @@ void decompress_kernel(unsigned long boot_heap_start) ...@@ -121,7 +121,7 @@ void decompress_kernel(unsigned long boot_heap_start)
dtb_size = fdt_totalsize((void *)&__appended_dtb); dtb_size = fdt_totalsize((void *)&__appended_dtb);
/* last four bytes is always image size in little endian */ /* last four bytes is always image size in little endian */
image_size = get_unaligned_le32((void *)&__image_end - 4); image_size = get_unaligned_le32((void *)__image_end - 4);
/* The device tree's address must be properly aligned */ /* The device tree's address must be properly aligned */
image_size = ALIGN(image_size, STRUCT_ALIGNMENT); image_size = ALIGN(image_size, STRUCT_ALIGNMENT);
......
...@@ -510,7 +510,7 @@ efuse: efuse@d0 { ...@@ -510,7 +510,7 @@ efuse: efuse@d0 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
eth0_addr: eth-mac-addr@0x22 { eth0_addr: eth-mac-addr@22 {
reg = <0x22 0x6>; reg = <0x22 0x6>;
}; };
}; };
......
...@@ -1274,13 +1274,13 @@ static int octeon_irq_gpio_map(struct irq_domain *d, ...@@ -1274,13 +1274,13 @@ static int octeon_irq_gpio_map(struct irq_domain *d,
return r; return r;
} }
static struct irq_domain_ops octeon_irq_domain_ciu_ops = { static const struct irq_domain_ops octeon_irq_domain_ciu_ops = {
.map = octeon_irq_ciu_map, .map = octeon_irq_ciu_map,
.unmap = octeon_irq_free_cd, .unmap = octeon_irq_free_cd,
.xlate = octeon_irq_ciu_xlat, .xlate = octeon_irq_ciu_xlat,
}; };
static struct irq_domain_ops octeon_irq_domain_gpio_ops = { static const struct irq_domain_ops octeon_irq_domain_gpio_ops = {
.map = octeon_irq_gpio_map, .map = octeon_irq_gpio_map,
.unmap = octeon_irq_free_cd, .unmap = octeon_irq_free_cd,
.xlate = octeon_irq_gpio_xlat, .xlate = octeon_irq_gpio_xlat,
...@@ -1974,7 +1974,7 @@ static int octeon_irq_ciu2_map(struct irq_domain *d, ...@@ -1974,7 +1974,7 @@ static int octeon_irq_ciu2_map(struct irq_domain *d,
return 0; return 0;
} }
static struct irq_domain_ops octeon_irq_domain_ciu2_ops = { static const struct irq_domain_ops octeon_irq_domain_ciu2_ops = {
.map = octeon_irq_ciu2_map, .map = octeon_irq_ciu2_map,
.unmap = octeon_irq_free_cd, .unmap = octeon_irq_free_cd,
.xlate = octeon_irq_ciu2_xlat, .xlate = octeon_irq_ciu2_xlat,
...@@ -2226,7 +2226,7 @@ static int octeon_irq_cib_map(struct irq_domain *d, ...@@ -2226,7 +2226,7 @@ static int octeon_irq_cib_map(struct irq_domain *d,
return 0; return 0;
} }
static struct irq_domain_ops octeon_irq_domain_cib_ops = { static const struct irq_domain_ops octeon_irq_domain_cib_ops = {
.map = octeon_irq_cib_map, .map = octeon_irq_cib_map,
.unmap = octeon_irq_free_cd, .unmap = octeon_irq_free_cd,
.xlate = octeon_irq_cib_xlat, .xlate = octeon_irq_cib_xlat,
...@@ -2578,7 +2578,7 @@ static int octeon_irq_ciu3_map(struct irq_domain *d, ...@@ -2578,7 +2578,7 @@ static int octeon_irq_ciu3_map(struct irq_domain *d,
return octeon_irq_ciu3_mapx(d, virq, hw, &octeon_irq_chip_ciu3); return octeon_irq_ciu3_mapx(d, virq, hw, &octeon_irq_chip_ciu3);
} }
static struct irq_domain_ops octeon_dflt_domain_ciu3_ops = { static const struct irq_domain_ops octeon_dflt_domain_ciu3_ops = {
.map = octeon_irq_ciu3_map, .map = octeon_irq_ciu3_map,
.unmap = octeon_irq_free_cd, .unmap = octeon_irq_free_cd,
.xlate = octeon_irq_ciu3_xlat, .xlate = octeon_irq_ciu3_xlat,
......
CONFIG_SYSVIPC=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_EXPERT=y
CONFIG_SLAB=y
CONFIG_MACH_TX39XX=y
CONFIG_TOSHIBA_JMR3927=y
# CONFIG_SECCOMP is not set
CONFIG_PCI=y
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IP_PNP=y
CONFIG_IP_PNP_BOOTP=y
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_BEET is not set
# CONFIG_INET_DIAG is not set
# CONFIG_IPV6 is not set
CONFIG_MTD=y
CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_CFI=y
CONFIG_MTD_JEDECPROBE=y
CONFIG_MTD_CFI_AMDSTD=y
CONFIG_MTD_PHYSMAP=y
CONFIG_NETDEVICES=y
CONFIG_TC35815=y
# CONFIG_INPUT is not set
# CONFIG_SERIO is not set
# CONFIG_VT is not set
# CONFIG_UNIX98_PTYS is not set
CONFIG_SERIAL_NONSTANDARD=y
CONFIG_SERIAL_TXX9_CONSOLE=y
CONFIG_SERIAL_TXX9_STDSERIAL=y
# CONFIG_HW_RANDOM is not set
# CONFIG_HWMON is not set
CONFIG_WATCHDOG=y
CONFIG_TXX9_WDT=y
# CONFIG_USB_SUPPORT is not set
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
CONFIG_LEDS_GPIO=y
CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_DS1742=y
CONFIG_PROC_KCORE=y
# CONFIG_MISC_FILESYSTEMS is not set
CONFIG_NFS_FS=y
CONFIG_ROOT_NFS=y
...@@ -4,6 +4,7 @@ CONFIG_HIGH_RES_TIMERS=y ...@@ -4,6 +4,7 @@ CONFIG_HIGH_RES_TIMERS=y
CONFIG_LOG_BUF_SHIFT=15 CONFIG_LOG_BUF_SHIFT=15
CONFIG_NAMESPACES=y CONFIG_NAMESPACES=y
CONFIG_RELAY=y CONFIG_RELAY=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_EXPERT=y CONFIG_EXPERT=y
# CONFIG_COMPAT_BRK is not set # CONFIG_COMPAT_BRK is not set
CONFIG_SLAB=y CONFIG_SLAB=y
......
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
*/ */
mfc0 t0,CP0_CAUSE # get pending interrupts mfc0 t0,CP0_CAUSE # get pending interrupts
mfc0 t1,CP0_STATUS mfc0 t1,CP0_STATUS
#ifdef CONFIG_32BIT #if defined(CONFIG_32BIT) && defined(CONFIG_MIPS_FP_SUPPORT)
lw t2,cpu_fpu_mask lw t2,cpu_fpu_mask
#endif #endif
andi t0,ST0_IM # CAUSE.CE may be non-zero! andi t0,ST0_IM # CAUSE.CE may be non-zero!
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
beqz t0,spurious beqz t0,spurious
#ifdef CONFIG_32BIT #if defined(CONFIG_32BIT) && defined(CONFIG_MIPS_FP_SUPPORT)
and t2,t0 and t2,t0
bnez t2,fpu # handle FPU immediately bnez t2,fpu # handle FPU immediately
#endif #endif
...@@ -280,7 +280,7 @@ handle_it: ...@@ -280,7 +280,7 @@ handle_it:
j dec_irq_dispatch j dec_irq_dispatch
nop nop
#ifdef CONFIG_32BIT #if defined(CONFIG_32BIT) && defined(CONFIG_MIPS_FP_SUPPORT)
fpu: fpu:
lw t0,fpu_kstat_irq lw t0,fpu_kstat_irq
nop nop
......
...@@ -6,4 +6,4 @@ ...@@ -6,4 +6,4 @@
lib-y += init.o memory.o cmdline.o identify.o console.o lib-y += init.o memory.o cmdline.o identify.o console.o
lib-$(CONFIG_32BIT) += locore.o lib-$(CONFIG_CPU_R3000) += locore.o
...@@ -746,7 +746,8 @@ void __init arch_init_irq(void) ...@@ -746,7 +746,8 @@ void __init arch_init_irq(void)
dec_interrupt[DEC_IRQ_HALT] = -1; dec_interrupt[DEC_IRQ_HALT] = -1;
/* Register board interrupts: FPU and cascade. */ /* Register board interrupts: FPU and cascade. */
if (dec_interrupt[DEC_IRQ_FPU] >= 0 && cpu_has_fpu) { if (IS_ENABLED(CONFIG_MIPS_FP_SUPPORT) &&
dec_interrupt[DEC_IRQ_FPU] >= 0 && cpu_has_fpu) {
struct irq_desc *desc_fpu; struct irq_desc *desc_fpu;
int irq_fpu; int irq_fpu;
......
...@@ -120,9 +120,6 @@ ...@@ -120,9 +120,6 @@
#ifndef cpu_has_4k_cache #ifndef cpu_has_4k_cache
#define cpu_has_4k_cache __isa_ge_or_opt(1, MIPS_CPU_4K_CACHE) #define cpu_has_4k_cache __isa_ge_or_opt(1, MIPS_CPU_4K_CACHE)
#endif #endif
#ifndef cpu_has_tx39_cache
#define cpu_has_tx39_cache __opt(MIPS_CPU_TX39_CACHE)
#endif
#ifndef cpu_has_octeon_cache #ifndef cpu_has_octeon_cache
#define cpu_has_octeon_cache 0 #define cpu_has_octeon_cache 0
#endif #endif
......
...@@ -105,12 +105,6 @@ static inline int __pure __get_cpu_type(const int cpu_type) ...@@ -105,12 +105,6 @@ static inline int __pure __get_cpu_type(const int cpu_type)
case CPU_R3081E: case CPU_R3081E:
#endif #endif
#ifdef CONFIG_SYS_HAS_CPU_TX39XX
case CPU_TX3912:
case CPU_TX3922:
case CPU_TX3927:
#endif
#ifdef CONFIG_SYS_HAS_CPU_VR41XX #ifdef CONFIG_SYS_HAS_CPU_VR41XX
case CPU_VR41XX: case CPU_VR41XX:
case CPU_VR4111: case CPU_VR4111:
......
...@@ -309,11 +309,6 @@ enum cpu_type_enum { ...@@ -309,11 +309,6 @@ enum cpu_type_enum {
CPU_VR4122, CPU_VR4131, CPU_VR4133, CPU_VR4181, CPU_VR4181A, CPU_RM7000, CPU_VR4122, CPU_VR4131, CPU_VR4133, CPU_VR4181, CPU_VR4181A, CPU_RM7000,
CPU_SR71000, CPU_TX49XX, CPU_SR71000, CPU_TX49XX,
/*
* TX3900 class processors
*/
CPU_TX3912, CPU_TX3922, CPU_TX3927,
/* /*
* MIPS32 class processors * MIPS32 class processors
*/ */
...@@ -367,7 +362,6 @@ enum cpu_type_enum { ...@@ -367,7 +362,6 @@ enum cpu_type_enum {
#define MIPS_CPU_4KEX BIT_ULL( 1) /* "R4K" exception model */ #define MIPS_CPU_4KEX BIT_ULL( 1) /* "R4K" exception model */
#define MIPS_CPU_3K_CACHE BIT_ULL( 2) /* R3000-style caches */ #define MIPS_CPU_3K_CACHE BIT_ULL( 2) /* R3000-style caches */
#define MIPS_CPU_4K_CACHE BIT_ULL( 3) /* R4000-style caches */ #define MIPS_CPU_4K_CACHE BIT_ULL( 3) /* R4000-style caches */
#define MIPS_CPU_TX39_CACHE BIT_ULL( 4) /* TX3900-style caches */
#define MIPS_CPU_FPU BIT_ULL( 5) /* CPU has FPU */ #define MIPS_CPU_FPU BIT_ULL( 5) /* CPU has FPU */
#define MIPS_CPU_32FPR BIT_ULL( 6) /* 32 dbl. prec. FP registers */ #define MIPS_CPU_32FPR BIT_ULL( 6) /* 32 dbl. prec. FP registers */
#define MIPS_CPU_COUNTER BIT_ULL( 7) /* Cycle count/compare */ #define MIPS_CPU_COUNTER BIT_ULL( 7) /* Cycle count/compare */
......
...@@ -43,16 +43,11 @@ ...@@ -43,16 +43,11 @@
*/ */
#define REX_PROM_MAGIC 0x30464354 #define REX_PROM_MAGIC 0x30464354
#ifdef CONFIG_64BIT /* KN04 and KN05 are REX PROMs, so only do the check for R3k systems. */
static inline bool prom_is_rex(u32 magic)
#define prom_is_rex(magic) 1 /* KN04 and KN05 are REX PROMs. */ {
return !IS_ENABLED(CONFIG_CPU_R3000) || magic == REX_PROM_MAGIC;
#else /* !CONFIG_64BIT */ }
#define prom_is_rex(magic) ((magic) == REX_PROM_MAGIC)
#endif /* !CONFIG_64BIT */
/* /*
* 3MIN/MAXINE PROM entry points for DS5000/1xx's, DS5000/xx's and * 3MIN/MAXINE PROM entry points for DS5000/1xx's, DS5000/xx's and
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include <asm/compiler.h> #include <asm/compiler.h>
#include <asm/errno.h> #include <asm/errno.h>
#include <asm/sync.h> #include <asm/sync.h>
#include <asm/war.h>
#define arch_futex_atomic_op_inuser arch_futex_atomic_op_inuser #define arch_futex_atomic_op_inuser arch_futex_atomic_op_inuser
#define futex_atomic_cmpxchg_inatomic futex_atomic_cmpxchg_inatomic #define futex_atomic_cmpxchg_inatomic futex_atomic_cmpxchg_inatomic
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#ifndef __ASM_ISADEP_H #ifndef __ASM_ISADEP_H
#define __ASM_ISADEP_H #define __ASM_ISADEP_H
#if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX) #if defined(CONFIG_CPU_R3000)
/* /*
* R2000 or R3000 * R2000 or R3000
*/ */
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#define cpu_has_4kex 1 #define cpu_has_4kex 1
#define cpu_has_3k_cache 0 #define cpu_has_3k_cache 0
#define cpu_has_4k_cache 1 #define cpu_has_4k_cache 1
#define cpu_has_tx39_cache 0
#define cpu_has_sb1_cache 0 #define cpu_has_sb1_cache 0
#define cpu_has_fpu 0 #define cpu_has_fpu 0
#define cpu_has_32fpr 0 #define cpu_has_32fpr 0
......
...@@ -862,6 +862,7 @@ ...@@ -862,6 +862,7 @@
#define REV_ID_MAJOR_QCA9558 0x1130 #define REV_ID_MAJOR_QCA9558 0x1130
#define REV_ID_MAJOR_TP9343 0x0150 #define REV_ID_MAJOR_TP9343 0x0150
#define REV_ID_MAJOR_QCA956X 0x1150 #define REV_ID_MAJOR_QCA956X 0x1150
#define REV_ID_MAJOR_QCN550X 0x2170
#define AR71XX_REV_ID_MINOR_MASK 0x3 #define AR71XX_REV_ID_MINOR_MASK 0x3
#define AR71XX_REV_ID_MINOR_AR7130 0x0 #define AR71XX_REV_ID_MINOR_AR7130 0x0
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#define cpu_has_4kex 1 #define cpu_has_4kex 1
#define cpu_has_3k_cache 0 #define cpu_has_3k_cache 0
#define cpu_has_4k_cache 1 #define cpu_has_4k_cache 1
#define cpu_has_tx39_cache 0
#define cpu_has_sb1_cache 0 #define cpu_has_sb1_cache 0
#define cpu_has_fpu 0 #define cpu_has_fpu 0
#define cpu_has_32fpr 0 #define cpu_has_32fpr 0
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#define cpu_has_4kex 1 #define cpu_has_4kex 1
#define cpu_has_3k_cache 0 #define cpu_has_3k_cache 0
#define cpu_has_4k_cache 1 #define cpu_has_4k_cache 1
#define cpu_has_tx39_cache 0
#define cpu_has_fpu 0 #define cpu_has_fpu 0
#define cpu_has_32fpr 0 #define cpu_has_32fpr 0
#define cpu_has_counter 1 #define cpu_has_counter 1
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#define cpu_has_4kex 1 #define cpu_has_4kex 1
#define cpu_has_3k_cache 0 #define cpu_has_3k_cache 0
#define cpu_has_4k_cache 1 #define cpu_has_4k_cache 1
#define cpu_has_tx39_cache 0
#define cpu_has_fpu 0 #define cpu_has_fpu 0
#define cpu_has_32fpr 0 #define cpu_has_32fpr 0
#define cpu_has_counter 1 #define cpu_has_counter 1
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#define cpu_has_4kex 1 #define cpu_has_4kex 1
#define cpu_has_3k_cache 0 #define cpu_has_3k_cache 0
#define cpu_has_4k_cache 0 #define cpu_has_4k_cache 0
#define cpu_has_tx39_cache 0
#define cpu_has_counter 1 #define cpu_has_counter 1
#define cpu_has_watch 1 #define cpu_has_watch 1
#define cpu_has_divec 1 #define cpu_has_divec 1
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#define cpu_has_4kex 1 #define cpu_has_4kex 1
#define cpu_has_3k_cache 0 #define cpu_has_3k_cache 0
#define cpu_has_4k_cache 1 #define cpu_has_4k_cache 1
#define cpu_has_tx39_cache 0
#define cpu_has_32fpr 1 #define cpu_has_32fpr 1
#define cpu_has_counter 1 #define cpu_has_counter 1
#define cpu_has_watch 0 #define cpu_has_watch 0
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#define cpu_has_rixiex 0 #define cpu_has_rixiex 0
#define cpu_has_maar 0 #define cpu_has_maar 0
#define cpu_has_rw_llb 0 #define cpu_has_rw_llb 0
#define cpu_has_tx39_cache 0
#define cpu_has_divec 0 #define cpu_has_divec 0
#define cpu_has_prefetch 0 #define cpu_has_prefetch 0
#define cpu_has_mcheck 0 #define cpu_has_mcheck 0
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#define cpu_has_4kex 1 #define cpu_has_4kex 1
#define cpu_has_3k_cache 0 #define cpu_has_3k_cache 0
#define cpu_has_4k_cache 1 #define cpu_has_4k_cache 1
#define cpu_has_tx39_cache 0
#define cpu_has_counter 0 #define cpu_has_counter 0
#define cpu_has_watch 1 #define cpu_has_watch 1
#define cpu_has_divec 1 #define cpu_has_divec 1
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#define cpu_has_4kex 1 #define cpu_has_4kex 1
#define cpu_has_3k_cache 0 #define cpu_has_3k_cache 0
#define cpu_has_4k_cache 1 #define cpu_has_4k_cache 1
#define cpu_has_tx39_cache 0
#define cpu_has_fpu 1 #define cpu_has_fpu 1
#define cpu_has_nofpuex 0 #define cpu_has_nofpuex 0
#define cpu_has_32fpr 1 #define cpu_has_32fpr 1
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#define cpu_has_4kex 1 #define cpu_has_4kex 1
#define cpu_has_3k_cache 0 #define cpu_has_3k_cache 0
#define cpu_has_4k_cache 1 #define cpu_has_4k_cache 1
#define cpu_has_tx39_cache 0
#define cpu_has_fpu 1 #define cpu_has_fpu 1
#define cpu_has_nofpuex 0 #define cpu_has_nofpuex 0
#define cpu_has_32fpr 1 #define cpu_has_32fpr 1
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#define cpu_has_4kex 1 #define cpu_has_4kex 1
#define cpu_has_3k_cache 0 #define cpu_has_3k_cache 0
#define cpu_has_4k_cache 1 #define cpu_has_4k_cache 1
#define cpu_has_tx39_cache 0
#define cpu_has_sb1_cache 0 #define cpu_has_sb1_cache 0
#define cpu_has_fpu 0 #define cpu_has_fpu 0
#define cpu_has_32fpr 0 #define cpu_has_32fpr 0
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#define cpu_has_mipsmt 0 #define cpu_has_mipsmt 0
#define cpu_has_smartmips 0 #define cpu_has_smartmips 0
#define cpu_has_tlb 1 #define cpu_has_tlb 1
#define cpu_has_tx39_cache 0
#define cpu_has_vce 0 #define cpu_has_vce 0
#define cpu_has_veic 0 #define cpu_has_veic 0
#define cpu_has_vint 0 #define cpu_has_vint 0
......
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
#define cpu_has_mipsmt 0 #define cpu_has_mipsmt 0
#define cpu_has_smartmips 0 #define cpu_has_smartmips 0
#define cpu_has_tlb 1 #define cpu_has_tlb 1
#define cpu_has_tx39_cache 0
#define cpu_has_vce 0 #define cpu_has_vce 0
#define cpu_has_veic 0 #define cpu_has_veic 0
#define cpu_has_vint 0 #define cpu_has_vint 0
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#define cpu_has_4kex 1 #define cpu_has_4kex 1
#define cpu_has_3k_cache 0 #define cpu_has_3k_cache 0
#define cpu_has_4k_cache 1 #define cpu_has_4k_cache 1
#define cpu_has_tx39_cache 0
#define cpu_has_sb1_cache 0 #define cpu_has_sb1_cache 0
#define cpu_has_fpu 0 #define cpu_has_fpu 0
#define cpu_has_32fpr 0 #define cpu_has_32fpr 0
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#define cpu_has_4kex 1 #define cpu_has_4kex 1
#define cpu_has_3k_cache 0 #define cpu_has_3k_cache 0
#define cpu_has_4k_cache 1 #define cpu_has_4k_cache 1
#define cpu_has_tx39_cache 0
#define cpu_has_sb1_cache 0 #define cpu_has_sb1_cache 0
#define cpu_has_fpu 0 #define cpu_has_fpu 0
#define cpu_has_32fpr 0 #define cpu_has_32fpr 0
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#define cpu_has_4kex 1 #define cpu_has_4kex 1
#define cpu_has_3k_cache 0 #define cpu_has_3k_cache 0
#define cpu_has_4k_cache 1 #define cpu_has_4k_cache 1
#define cpu_has_tx39_cache 0
#define cpu_has_sb1_cache 0 #define cpu_has_sb1_cache 0
#define cpu_has_fpu 0 #define cpu_has_fpu 0
#define cpu_has_32fpr 0 #define cpu_has_32fpr 0
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#define cpu_has_4kex 1 #define cpu_has_4kex 1
#define cpu_has_3k_cache 0 #define cpu_has_3k_cache 0
#define cpu_has_4k_cache 1 #define cpu_has_4k_cache 1
#define cpu_has_tx39_cache 0
#define cpu_has_sb1_cache 0 #define cpu_has_sb1_cache 0
#define cpu_has_fpu 0 #define cpu_has_fpu 0
#define cpu_has_32fpr 0 #define cpu_has_32fpr 0
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#define cpu_has_4kex 1 #define cpu_has_4kex 1
#define cpu_has_3k_cache 0 #define cpu_has_3k_cache 0
#define cpu_has_4k_cache 1 #define cpu_has_4k_cache 1
#define cpu_has_tx39_cache 0
#define cpu_has_sb1_cache 0 #define cpu_has_sb1_cache 0
#define cpu_has_fpu 0 #define cpu_has_fpu 0
#define cpu_has_32fpr 0 #define cpu_has_32fpr 0
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#define cpu_has_4kex 1 #define cpu_has_4kex 1
#define cpu_has_3k_cache 0 #define cpu_has_3k_cache 0
#define cpu_has_4k_cache 1 #define cpu_has_4k_cache 1
#define cpu_has_tx39_cache 0
#define cpu_has_sb1_cache 0 #define cpu_has_sb1_cache 0
#define cpu_has_fpu 0 #define cpu_has_fpu 0
#define cpu_has_32fpr 0 #define cpu_has_32fpr 0
......
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* include/asm-mips/mach-tx39xx/ioremap.h
*/
#ifndef __ASM_MACH_TX39XX_IOREMAP_H
#define __ASM_MACH_TX39XX_IOREMAP_H
#include <linux/types.h>
static inline void __iomem *plat_ioremap(phys_addr_t offset, unsigned long size,
unsigned long flags)
{
#define TXX9_DIRECTMAP_BASE 0xff000000ul
if (offset >= TXX9_DIRECTMAP_BASE &&
offset < TXX9_DIRECTMAP_BASE + 0xff0000)
return (void __iomem *)offset;
return NULL;
}
static inline int plat_iounmap(const volatile void __iomem *addr)
{
return (unsigned long)addr >= TXX9_DIRECTMAP_BASE;
}
#endif /* __ASM_MACH_TX39XX_IOREMAP_H */
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __ASM_MACH_TX39XX_MANGLE_PORT_H
#define __ASM_MACH_TX39XX_MANGLE_PORT_H
#if defined(CONFIG_TOSHIBA_JMR3927)
extern unsigned long (*__swizzle_addr_b)(unsigned long port);
#define NEEDS_TXX9_SWIZZLE_ADDR_B
#else
#define __swizzle_addr_b(port) (port)
#endif
#define __swizzle_addr_w(port) (port)
#define __swizzle_addr_l(port) (port)
#define __swizzle_addr_q(port) (port)
#define ioswabb(a, x) (x)
#define __mem_ioswabb(a, x) (x)
#define ioswabw(a, x) le16_to_cpu((__force __le16)(x))
#define __mem_ioswabw(a, x) (x)
#define ioswabl(a, x) le32_to_cpu((__force __le32)(x))
#define __mem_ioswabl(a, x) (x)
#define ioswabq(a, x) le64_to_cpu((__force __le64)(x))
#define __mem_ioswabq(a, x) (x)
#endif /* __ASM_MACH_TX39XX_MANGLE_PORT_H */
/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* Copyright (C) 1994 - 1999, 2000, 03, 04 Ralf Baechle
* Copyright (C) 2000, 2002 Maciej W. Rozycki
* Copyright (C) 1990, 1999, 2000 Silicon Graphics, Inc.
*/
#ifndef _ASM_TX39XX_SPACES_H
#define _ASM_TX39XX_SPACES_H
#define FIXADDR_TOP ((unsigned long)(long)(int)0xfefe0000)
#include <asm/mach-generic/spaces.h>
#endif /* __ASM_TX39XX_SPACES_H */
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#define _ASM_MIPSMTREGS_H #define _ASM_MIPSMTREGS_H
#include <asm/mipsregs.h> #include <asm/mipsregs.h>
#include <asm/war.h>
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include <linux/types.h> #include <linux/types.h>
#include <asm/hazards.h> #include <asm/hazards.h>
#include <asm/isa-rev.h> #include <asm/isa-rev.h>
#include <asm/war.h>
/* /*
* The following macros are especially useful for __asm__ * The following macros are especially useful for __asm__
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#define __HAVE_ARCH_PMD_ALLOC_ONE #define __HAVE_ARCH_PMD_ALLOC_ONE
#define __HAVE_ARCH_PUD_ALLOC_ONE #define __HAVE_ARCH_PUD_ALLOC_ONE
#define __HAVE_ARCH_PGD_FREE
#include <asm-generic/pgalloc.h> #include <asm-generic/pgalloc.h>
static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd,
...@@ -48,6 +49,11 @@ static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd) ...@@ -48,6 +49,11 @@ static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd)
extern void pgd_init(unsigned long page); extern void pgd_init(unsigned long page);
extern pgd_t *pgd_alloc(struct mm_struct *mm); extern pgd_t *pgd_alloc(struct mm_struct *mm);
static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
{
free_pages((unsigned long)pgd, PGD_ORDER);
}
#define __pte_free_tlb(tlb,pte,address) \ #define __pte_free_tlb(tlb,pte,address) \
do { \ do { \
pgtable_pte_page_dtor(pte); \ pgtable_pte_page_dtor(pte); \
......
...@@ -20,9 +20,9 @@ struct boot_param_header; ...@@ -20,9 +20,9 @@ struct boot_param_header;
extern void __dt_setup_arch(void *bph); extern void __dt_setup_arch(void *bph);
extern int __dt_register_buses(const char *bus0, const char *bus1); extern int __dt_register_buses(const char *bus0, const char *bus1);
#else /* CONFIG_OF */ #else /* !CONFIG_USE_OF */
static inline void device_tree_init(void) { } static inline void device_tree_init(void) { }
#endif /* CONFIG_OF */ #endif /* !CONFIG_USE_OF */
extern char *mips_get_machine_name(void); extern char *mips_get_machine_name(void);
extern void mips_set_machine_name(const char *name); extern void mips_set_machine_name(const char *name);
......
...@@ -16,7 +16,7 @@ static inline void setup_8250_early_printk_port(unsigned long base, ...@@ -16,7 +16,7 @@ static inline void setup_8250_early_printk_port(unsigned long base,
unsigned int reg_shift, unsigned int timeout) {} unsigned int reg_shift, unsigned int timeout) {}
#endif #endif
extern void set_handler(unsigned long offset, void *addr, unsigned long len); void set_handler(unsigned long offset, const void *addr, unsigned long len);
extern void set_uncached_handler(unsigned long offset, void *addr, unsigned long len); extern void set_uncached_handler(unsigned long offset, void *addr, unsigned long len);
typedef void (*vi_handler_t)(void); typedef void (*vi_handler_t)(void);
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
cfi_restore \reg \offset \docfi cfi_restore \reg \offset \docfi
.endm .endm
#if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX) #if defined(CONFIG_CPU_R3000)
#define STATMASK 0x3f #define STATMASK 0x3f
#else #else
#define STATMASK 0x1f #define STATMASK 0x1f
...@@ -349,7 +349,7 @@ ...@@ -349,7 +349,7 @@
cfi_ld sp, PT_R29, \docfi cfi_ld sp, PT_R29, \docfi
.endm .endm
#if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX) #if defined(CONFIG_CPU_R3000)
.macro RESTORE_SOME docfi=0 .macro RESTORE_SOME docfi=0
.set push .set push
...@@ -478,7 +478,7 @@ ...@@ -478,7 +478,7 @@
.macro KMODE .macro KMODE
mfc0 t0, CP0_STATUS mfc0 t0, CP0_STATUS
li t1, ST0_KERNEL_CUMASK | (STATMASK & ~1) li t1, ST0_KERNEL_CUMASK | (STATMASK & ~1)
#if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX) #if defined(CONFIG_CPU_R3000)
andi t2, t0, ST0_IEP andi t2, t0, ST0_IEP
srl t2, 2 srl t2, 2
or t0, t2 or t0, t2
......
...@@ -69,6 +69,10 @@ static inline struct thread_info *current_thread_info(void) ...@@ -69,6 +69,10 @@ static inline struct thread_info *current_thread_info(void)
return __current_thread_info; return __current_thread_info;
} }
#ifdef CONFIG_ARCH_HAS_CURRENT_STACK_POINTER
register unsigned long current_stack_pointer __asm__("sp");
#endif
#endif /* !__ASSEMBLY__ */ #endif /* !__ASSEMBLY__ */
/* thread information allocation */ /* thread information allocation */
......
/* SPDX-License-Identifier: GPL-2.0 */ /* SPDX-License-Identifier: GPL-2.0 */
#ifdef CONFIG_TOSHIBA_JMR3927
BOARD_VEC(jmr3927_vec)
#endif
#ifdef CONFIG_TOSHIBA_RBTX4927 #ifdef CONFIG_TOSHIBA_RBTX4927
BOARD_VEC(rbtx4927_vec) BOARD_VEC(rbtx4927_vec)
BOARD_VEC(rbtx4937_vec) BOARD_VEC(rbtx4937_vec)
......
/*
* Defines for the TJSYS JMR-TX3927
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* Copyright (C) 2000-2001 Toshiba Corporation
*/
#ifndef __ASM_TXX9_JMR3927_H
#define __ASM_TXX9_JMR3927_H
#include <asm/txx9/tx3927.h>
#include <asm/addrspace.h>
#include <asm/txx9irq.h>
/* CS */
#define JMR3927_ROMCE0 0x1fc00000 /* 4M */
#define JMR3927_ROMCE1 0x1e000000 /* 4M */
#define JMR3927_ROMCE2 0x14000000 /* 16M */
#define JMR3927_ROMCE3 0x10000000 /* 64M */
#define JMR3927_ROMCE5 0x1d000000 /* 4M */
#define JMR3927_SDCS0 0x00000000 /* 32M */
#define JMR3927_SDCS1 0x02000000 /* 32M */
/* PCI Direct Mappings */
#define JMR3927_PCIMEM 0x08000000
#define JMR3927_PCIMEM_SIZE 0x08000000 /* 128M */
#define JMR3927_PCIIO 0x15000000
#define JMR3927_PCIIO_SIZE 0x01000000 /* 16M */
#define JMR3927_SDRAM_SIZE 0x02000000 /* 32M */
#define JMR3927_PORT_BASE KSEG1
/* Address map (virtual address) */
#define JMR3927_ROM0_BASE (KSEG1 + JMR3927_ROMCE0)
#define JMR3927_ROM1_BASE (KSEG1 + JMR3927_ROMCE1)
#define JMR3927_IOC_BASE (KSEG1 + JMR3927_ROMCE2)
#define JMR3927_PCIMEM_BASE (KSEG1 + JMR3927_PCIMEM)
#define JMR3927_PCIIO_BASE (KSEG1 + JMR3927_PCIIO)
#define JMR3927_IOC_REV_ADDR (JMR3927_IOC_BASE + 0x00000000)
#define JMR3927_IOC_NVRAMB_ADDR (JMR3927_IOC_BASE + 0x00010000)
#define JMR3927_IOC_LED_ADDR (JMR3927_IOC_BASE + 0x00020000)
#define JMR3927_IOC_DIPSW_ADDR (JMR3927_IOC_BASE + 0x00030000)
#define JMR3927_IOC_BREV_ADDR (JMR3927_IOC_BASE + 0x00040000)
#define JMR3927_IOC_DTR_ADDR (JMR3927_IOC_BASE + 0x00050000)
#define JMR3927_IOC_INTS1_ADDR (JMR3927_IOC_BASE + 0x00080000)
#define JMR3927_IOC_INTS2_ADDR (JMR3927_IOC_BASE + 0x00090000)
#define JMR3927_IOC_INTM_ADDR (JMR3927_IOC_BASE + 0x000a0000)
#define JMR3927_IOC_INTP_ADDR (JMR3927_IOC_BASE + 0x000b0000)
#define JMR3927_IOC_RESET_ADDR (JMR3927_IOC_BASE + 0x000f0000)
/* Flash ROM */
#define JMR3927_FLASH_BASE (JMR3927_ROM0_BASE)
#define JMR3927_FLASH_SIZE 0x00400000
/* bits for IOC_REV/IOC_BREV (high byte) */
#define JMR3927_IDT_MASK 0xfc
#define JMR3927_REV_MASK 0x03
#define JMR3927_IOC_IDT 0xe0
/* bits for IOC_INTS1/IOC_INTS2/IOC_INTM/IOC_INTP (high byte) */
#define JMR3927_IOC_INTB_PCIA 0
#define JMR3927_IOC_INTB_PCIB 1
#define JMR3927_IOC_INTB_PCIC 2
#define JMR3927_IOC_INTB_PCID 3
#define JMR3927_IOC_INTB_MODEM 4
#define JMR3927_IOC_INTB_INT6 5
#define JMR3927_IOC_INTB_INT7 6
#define JMR3927_IOC_INTB_SOFT 7
#define JMR3927_IOC_INTF_PCIA (1 << JMR3927_IOC_INTF_PCIA)
#define JMR3927_IOC_INTF_PCIB (1 << JMR3927_IOC_INTB_PCIB)
#define JMR3927_IOC_INTF_PCIC (1 << JMR3927_IOC_INTB_PCIC)
#define JMR3927_IOC_INTF_PCID (1 << JMR3927_IOC_INTB_PCID)
#define JMR3927_IOC_INTF_MODEM (1 << JMR3927_IOC_INTB_MODEM)
#define JMR3927_IOC_INTF_INT6 (1 << JMR3927_IOC_INTB_INT6)
#define JMR3927_IOC_INTF_INT7 (1 << JMR3927_IOC_INTB_INT7)
#define JMR3927_IOC_INTF_SOFT (1 << JMR3927_IOC_INTB_SOFT)
/* bits for IOC_RESET (high byte) */
#define JMR3927_IOC_RESET_CPU 1
#define JMR3927_IOC_RESET_PCI 2
#if defined(__BIG_ENDIAN)
#define jmr3927_ioc_reg_out(d, a) ((*(volatile unsigned char *)(a)) = (d))
#define jmr3927_ioc_reg_in(a) (*(volatile unsigned char *)(a))
#elif defined(__LITTLE_ENDIAN)
#define jmr3927_ioc_reg_out(d, a) ((*(volatile unsigned char *)((a)^1)) = (d))
#define jmr3927_ioc_reg_in(a) (*(volatile unsigned char *)((a)^1))
#else
#error "No Endian"
#endif
/* LED macro */
#define jmr3927_led_set(n/*0-16*/) jmr3927_ioc_reg_out(~(n), JMR3927_IOC_LED_ADDR)
#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)
/* DIPSW4 macro */
#define jmr3927_dipsw1() (gpio_get_value(11) == 0)
#define jmr3927_dipsw2() (gpio_get_value(10) == 0)
#define jmr3927_dipsw3() ((jmr3927_ioc_reg_in(JMR3927_IOC_DIPSW_ADDR) & 2) == 0)
#define jmr3927_dipsw4() ((jmr3927_ioc_reg_in(JMR3927_IOC_DIPSW_ADDR) & 1) == 0)
/*
* IRQ mappings
*/
/* These are the virtual IRQ numbers, we divide all IRQ's into
* 'spaces', the 'space' determines where and how to enable/disable
* that particular IRQ on an JMR machine. Add new 'spaces' as new
* IRQ hardware is supported.
*/
#define JMR3927_NR_IRQ_IRC 16 /* On-Chip IRC */
#define JMR3927_NR_IRQ_IOC 8 /* PCI/MODEM/INT[6:7] */
#define JMR3927_IRQ_IRC TXX9_IRQ_BASE
#define JMR3927_IRQ_IOC (JMR3927_IRQ_IRC + JMR3927_NR_IRQ_IRC)
#define JMR3927_IRQ_END (JMR3927_IRQ_IOC + JMR3927_NR_IRQ_IOC)
#define JMR3927_IRQ_IRC_INT0 (JMR3927_IRQ_IRC + TX3927_IR_INT0)
#define JMR3927_IRQ_IRC_INT1 (JMR3927_IRQ_IRC + TX3927_IR_INT1)
#define JMR3927_IRQ_IRC_INT2 (JMR3927_IRQ_IRC + TX3927_IR_INT2)
#define JMR3927_IRQ_IRC_INT3 (JMR3927_IRQ_IRC + TX3927_IR_INT3)
#define JMR3927_IRQ_IRC_INT4 (JMR3927_IRQ_IRC + TX3927_IR_INT4)
#define JMR3927_IRQ_IRC_INT5 (JMR3927_IRQ_IRC + TX3927_IR_INT5)
#define JMR3927_IRQ_IRC_SIO0 (JMR3927_IRQ_IRC + TX3927_IR_SIO0)
#define JMR3927_IRQ_IRC_SIO1 (JMR3927_IRQ_IRC + TX3927_IR_SIO1)
#define JMR3927_IRQ_IRC_SIO(ch) (JMR3927_IRQ_IRC + TX3927_IR_SIO(ch))
#define JMR3927_IRQ_IRC_DMA (JMR3927_IRQ_IRC + TX3927_IR_DMA)
#define JMR3927_IRQ_IRC_PIO (JMR3927_IRQ_IRC + TX3927_IR_PIO)
#define JMR3927_IRQ_IRC_PCI (JMR3927_IRQ_IRC + TX3927_IR_PCI)
#define JMR3927_IRQ_IRC_TMR(ch) (JMR3927_IRQ_IRC + TX3927_IR_TMR(ch))
#define JMR3927_IRQ_IOC_PCIA (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIA)
#define JMR3927_IRQ_IOC_PCIB (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIB)
#define JMR3927_IRQ_IOC_PCIC (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCIC)
#define JMR3927_IRQ_IOC_PCID (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_PCID)
#define JMR3927_IRQ_IOC_MODEM (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_MODEM)
#define JMR3927_IRQ_IOC_INT6 (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_INT6)
#define JMR3927_IRQ_IOC_INT7 (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_INT7)
#define JMR3927_IRQ_IOC_SOFT (JMR3927_IRQ_IOC + JMR3927_IOC_INTB_SOFT)
/* IOC (PCI, MODEM) */
#define JMR3927_IRQ_IOCINT JMR3927_IRQ_IRC_INT1
/* TC35815 100M Ether (JMR-TX3912:JPW4:2-3 Short) */
#define JMR3927_IRQ_ETHER0 JMR3927_IRQ_IRC_INT3
/* Clocks */
#define JMR3927_CORECLK 132710400 /* 132.7MHz */
/*
* TX3927 Pin Configuration:
*
* PCFG bits Avail Dead
* SELSIO[1:0]:11 RXD[1:0], TXD[1:0] PIO[6:3]
* SELSIOC[0]:1 CTS[0], RTS[0] INT[5:4]
* SELSIOC[1]:0,SELDSF:0, GSDAO[0],GPCST[3] CTS[1], RTS[1],DSF,
* GDBGE* PIO[2:1]
* SELDMA[2]:1 DMAREQ[2],DMAACK[2] PIO[13:12]
* SELTMR[2:0]:000 TIMER[1:0]
* SELCS:0,SELDMA[1]:0 PIO[11;10] SDCS_CE[7:6],
* DMAREQ[1],DMAACK[1]
* SELDMA[0]:1 DMAREQ[0],DMAACK[0] PIO[9:8]
* SELDMA[3]:1 DMAREQ[3],DMAACK[3] PIO[15:14]
* SELDONE:1 DMADONE PIO[7]
*
* Usable pins are:
* RXD[1;0],TXD[1:0],CTS[0],RTS[0],
* DMAREQ[0,2,3],DMAACK[0,2,3],DMADONE,PIO[0,10,11]
* INT[3:0]
*/
void jmr3927_prom_init(void);
void jmr3927_irq_setup(void);
struct pci_dev;
int jmr3927_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin);
#endif /* __ASM_TXX9_JMR3927_H */
This diff is collapsed.
...@@ -21,11 +21,7 @@ ...@@ -21,11 +21,7 @@
#endif #endif
#endif #endif
#ifdef CONFIG_CPU_TX39XX
#define TXx9_MAX_IR 16
#else
#define TXx9_MAX_IR 32 #define TXx9_MAX_IR 32
#endif
void txx9_irq_init(unsigned long baseaddr); void txx9_irq_init(unsigned long baseaddr);
int txx9_irq(void); int txx9_irq(void);
......
...@@ -58,10 +58,6 @@ void txx9_clockevent_init(unsigned long baseaddr, int irq, ...@@ -58,10 +58,6 @@ void txx9_clockevent_init(unsigned long baseaddr, int irq,
unsigned int imbusclk); unsigned int imbusclk);
void txx9_tmr_init(unsigned long baseaddr); void txx9_tmr_init(unsigned long baseaddr);
#ifdef CONFIG_CPU_TX39XX
#define TXX9_TIMER_BITS 24
#else
#define TXX9_TIMER_BITS 32 #define TXX9_TIMER_BITS 32
#endif
#endif /* __ASM_TXX9TMR_H */ #endif /* __ASM_TXX9TMR_H */
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
#define MODULE_PROC_FAMILY "MIPS64_R6 " #define MODULE_PROC_FAMILY "MIPS64_R6 "
#elif defined CONFIG_CPU_R3000 #elif defined CONFIG_CPU_R3000
#define MODULE_PROC_FAMILY "R3000 " #define MODULE_PROC_FAMILY "R3000 "
#elif defined CONFIG_CPU_TX39XX
#define MODULE_PROC_FAMILY "TX39XX "
#elif defined CONFIG_CPU_VR41XX #elif defined CONFIG_CPU_VR41XX
#define MODULE_PROC_FAMILY "VR41XX " #define MODULE_PROC_FAMILY "VR41XX "
#elif defined CONFIG_CPU_R4300 #elif defined CONFIG_CPU_R4300
......
/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* Copyright (C) 2002, 2004, 2007 by Ralf Baechle
* Copyright (C) 2007 Maciej W. Rozycki
*/
#ifndef _ASM_WAR_H
#define _ASM_WAR_H
/*
* Work around certain R4000 CPU errata (as implemented by GCC):
*
* - A double-word or a variable shift may give an incorrect result
* if executed immediately after starting an integer division:
* "MIPS R4000PC/SC Errata, Processor Revision 2.2 and 3.0",
* erratum #28
* "MIPS R4000MC Errata, Processor Revision 2.2 and 3.0", erratum
* #19
*
* - A double-word or a variable shift may give an incorrect result
* if executed while an integer multiplication is in progress:
* "MIPS R4000PC/SC Errata, Processor Revision 2.2 and 3.0",
* errata #16 & #28
*
* - An integer division may give an incorrect result if started in
* a delay slot of a taken branch or a jump:
* "MIPS R4000PC/SC Errata, Processor Revision 2.2 and 3.0",
* erratum #52
*/
#ifdef CONFIG_CPU_R4000_WORKAROUNDS
#define R4000_WAR 1
#else
#define R4000_WAR 0
#endif
/*
* Work around certain R4400 CPU errata (as implemented by GCC):
*
* - A double-word or a variable shift may give an incorrect result
* if executed immediately after starting an integer division:
* "MIPS R4400MC Errata, Processor Revision 1.0", erratum #10
* "MIPS R4400MC Errata, Processor Revision 2.0 & 3.0", erratum #4
*/
#ifdef CONFIG_CPU_R4400_WORKAROUNDS
#define R4400_WAR 1
#else
#define R4400_WAR 0
#endif
/*
* Work around the "daddi" and "daddiu" CPU errata:
*
* - The `daddi' instruction fails to trap on overflow.
* "MIPS R4000PC/SC Errata, Processor Revision 2.2 and 3.0",
* erratum #23
*
* - The `daddiu' instruction can produce an incorrect result.
* "MIPS R4000PC/SC Errata, Processor Revision 2.2 and 3.0",
* erratum #41
* "MIPS R4000MC Errata, Processor Revision 2.2 and 3.0", erratum
* #15
* "MIPS R4400PC/SC Errata, Processor Revision 1.0", erratum #7
* "MIPS R4400MC Errata, Processor Revision 1.0", erratum #5
*/
#ifdef CONFIG_CPU_DADDI_WORKAROUNDS
#define DADDI_WAR 1
#else
#define DADDI_WAR 0
#endif
#endif /* _ASM_WAR_H */
...@@ -44,7 +44,6 @@ obj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o ...@@ -44,7 +44,6 @@ obj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o
sw-y := r4k_switch.o sw-y := r4k_switch.o
sw-$(CONFIG_CPU_R3000) := r2300_switch.o sw-$(CONFIG_CPU_R3000) := r2300_switch.o
sw-$(CONFIG_CPU_TX39XX) := r2300_switch.o
sw-$(CONFIG_CPU_CAVIUM_OCTEON) := octeon_switch.o sw-$(CONFIG_CPU_CAVIUM_OCTEON) := octeon_switch.o
obj-y += $(sw-y) obj-y += $(sw-y)
......
...@@ -1189,29 +1189,6 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) ...@@ -1189,29 +1189,6 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
c->tlbsize = 48; c->tlbsize = 48;
break; break;
#endif #endif
case PRID_IMP_TX39:
c->fpu_msk31 |= FPU_CSR_CONDX | FPU_CSR_FS;
c->options = MIPS_CPU_TLB | MIPS_CPU_TX39_CACHE;
if ((c->processor_id & 0xf0) == (PRID_REV_TX3927 & 0xf0)) {
c->cputype = CPU_TX3927;
__cpu_name[cpu] = "TX3927";
c->tlbsize = 64;
} else {
switch (c->processor_id & PRID_REV_MASK) {
case PRID_REV_TX3912:
c->cputype = CPU_TX3912;
__cpu_name[cpu] = "TX3912";
c->tlbsize = 32;
break;
case PRID_REV_TX3922:
c->cputype = CPU_TX3922;
__cpu_name[cpu] = "TX3922";
c->tlbsize = 64;
break;
}
}
break;
case PRID_IMP_R4700: case PRID_IMP_R4700:
c->cputype = CPU_R4700; c->cputype = CPU_R4700;
__cpu_name[cpu] = "R4700"; __cpu_name[cpu] = "R4700";
......
...@@ -118,28 +118,6 @@ void cpu_probe(void) ...@@ -118,28 +118,6 @@ void cpu_probe(void)
c->options |= MIPS_CPU_FPU; c->options |= MIPS_CPU_FPU;
c->tlbsize = 64; c->tlbsize = 64;
break; break;
case PRID_COMP_LEGACY | PRID_IMP_TX39:
c->options = MIPS_CPU_TLB | MIPS_CPU_TX39_CACHE;
if ((c->processor_id & 0xf0) == (PRID_REV_TX3927 & 0xf0)) {
c->cputype = CPU_TX3927;
__cpu_name[cpu] = "TX3927";
c->tlbsize = 64;
} else {
switch (c->processor_id & PRID_REV_MASK) {
case PRID_REV_TX3912:
c->cputype = CPU_TX3912;
__cpu_name[cpu] = "TX3912";
c->tlbsize = 32;
break;
case PRID_REV_TX3922:
c->cputype = CPU_TX3922;
__cpu_name[cpu] = "TX3922";
c->tlbsize = 64;
break;
}
}
break;
} }
BUG_ON(!__cpu_name[cpu]); BUG_ON(!__cpu_name[cpu]);
......
...@@ -328,16 +328,10 @@ void mips_set_personality_nan(struct arch_elf_state *state) ...@@ -328,16 +328,10 @@ void mips_set_personality_nan(struct arch_elf_state *state)
int mips_elf_read_implies_exec(void *elf_ex, int exstack) int mips_elf_read_implies_exec(void *elf_ex, int exstack)
{ {
if (exstack != EXSTACK_DISABLE_X) { /*
/* The binary doesn't request a non-executable stack */ * Set READ_IMPLIES_EXEC only on non-NX systems that
return 1; * do not request a specific state via PT_GNU_STACK.
} */
return (!cpu_has_rixi && exstack == EXSTACK_DEFAULT);
if (!cpu_has_rixi) {
/* The CPU doesn't support non-executable memory */
return 1;
}
return 0;
} }
EXPORT_SYMBOL(mips_elf_read_implies_exec); EXPORT_SYMBOL(mips_elf_read_implies_exec);
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include <asm/stackframe.h> #include <asm/stackframe.h>
#include <asm/isadep.h> #include <asm/isadep.h>
#include <asm/thread_info.h> #include <asm/thread_info.h>
#include <asm/war.h>
#ifndef CONFIG_PREEMPTION #ifndef CONFIG_PREEMPTION
#define resume_kernel restore_all #define resume_kernel restore_all
...@@ -101,7 +100,7 @@ restore_partial: # restore partial frame ...@@ -101,7 +100,7 @@ restore_partial: # restore partial frame
SAVE_AT SAVE_AT
SAVE_TEMP SAVE_TEMP
LONG_L v0, PT_STATUS(sp) LONG_L v0, PT_STATUS(sp)
#if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX) #if defined(CONFIG_CPU_R3000)
and v0, ST0_IEP and v0, ST0_IEP
#else #else
and v0, ST0_IE and v0, ST0_IE
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include <asm/mipsregs.h> #include <asm/mipsregs.h>
#include <asm/stackframe.h> #include <asm/stackframe.h>
#include <asm/sync.h> #include <asm/sync.h>
#include <asm/war.h>
#include <asm/thread_info.h> #include <asm/thread_info.h>
__INIT __INIT
...@@ -163,7 +162,7 @@ NESTED(handle_int, PT_SIZE, sp) ...@@ -163,7 +162,7 @@ NESTED(handle_int, PT_SIZE, sp)
.set push .set push
.set noat .set noat
mfc0 k0, CP0_STATUS mfc0 k0, CP0_STATUS
#if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX) #if defined(CONFIG_CPU_R3000)
and k0, ST0_IEP and k0, ST0_IEP
bnez k0, 1f bnez k0, 1f
...@@ -645,7 +644,7 @@ isrdhwr: ...@@ -645,7 +644,7 @@ isrdhwr:
get_saved_sp /* k1 := current_thread_info */ get_saved_sp /* k1 := current_thread_info */
.set noreorder .set noreorder
MFC0 k0, CP0_EPC MFC0 k0, CP0_EPC
#if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX) #if defined(CONFIG_CPU_R3000)
ori k1, _THREAD_MASK ori k1, _THREAD_MASK
xori k1, _THREAD_MASK xori k1, _THREAD_MASK
LONG_L v1, TI_TP_VALUE(k1) LONG_L v1, TI_TP_VALUE(k1)
......
...@@ -36,13 +36,6 @@ static void __cpuidle r3081_wait(void) ...@@ -36,13 +36,6 @@ static void __cpuidle r3081_wait(void)
raw_local_irq_enable(); raw_local_irq_enable();
} }
static void __cpuidle r39xx_wait(void)
{
if (!need_resched())
write_c0_conf(read_c0_conf() | TX39_CONF_HALT);
raw_local_irq_enable();
}
void __cpuidle r4k_wait(void) void __cpuidle r4k_wait(void)
{ {
raw_local_irq_enable(); raw_local_irq_enable();
...@@ -147,9 +140,6 @@ void __init check_wait(void) ...@@ -147,9 +140,6 @@ void __init check_wait(void)
case CPU_R3081E: case CPU_R3081E:
cpu_wait = r3081_wait; cpu_wait = r3081_wait;
break; break;
case CPU_TX3927:
cpu_wait = r39xx_wait;
break;
case CPU_R4200: case CPU_R4200:
/* case CPU_R4300: */ /* case CPU_R4300: */
case CPU_R4600: case CPU_R4600:
......
...@@ -72,11 +72,6 @@ static void txx9_irq_unmask(struct irq_data *d) ...@@ -72,11 +72,6 @@ static void txx9_irq_unmask(struct irq_data *d)
__raw_writel((__raw_readl(ilrp) & ~(0xff << ofs)) __raw_writel((__raw_readl(ilrp) & ~(0xff << ofs))
| (txx9irq[irq_nr].level << ofs), | (txx9irq[irq_nr].level << ofs),
ilrp); ilrp);
#ifdef CONFIG_CPU_TX39XX
/* update IRCSR */
__raw_writel(0, &txx9_ircptr->imr);
__raw_writel(irc_elevel, &txx9_ircptr->imr);
#endif
} }
static inline void txx9_irq_mask(struct irq_data *d) static inline void txx9_irq_mask(struct irq_data *d)
...@@ -88,15 +83,7 @@ static inline void txx9_irq_mask(struct irq_data *d) ...@@ -88,15 +83,7 @@ static inline void txx9_irq_mask(struct irq_data *d)
__raw_writel((__raw_readl(ilrp) & ~(0xff << ofs)) __raw_writel((__raw_readl(ilrp) & ~(0xff << ofs))
| (irc_dlevel << ofs), | (irc_dlevel << ofs),
ilrp); ilrp);
#ifdef CONFIG_CPU_TX39XX
/* update IRCSR */
__raw_writel(0, &txx9_ircptr->imr);
__raw_writel(irc_elevel, &txx9_ircptr->imr);
/* flush write buffer */
__raw_readl(&txx9_ircptr->ssr);
#else
mmiowb(); mmiowb();
#endif
} }
static void txx9_irq_mask_ack(struct irq_data *d) static void txx9_irq_mask_ack(struct irq_data *d)
......
...@@ -181,8 +181,6 @@ static int show_cpuinfo(struct seq_file *m, void *v) ...@@ -181,8 +181,6 @@ static int show_cpuinfo(struct seq_file *m, void *v)
seq_puts(m, " 3k_cache"); seq_puts(m, " 3k_cache");
if (cpu_has_4k_cache) if (cpu_has_4k_cache)
seq_puts(m, " 4k_cache"); seq_puts(m, " 4k_cache");
if (cpu_has_tx39_cache)
seq_puts(m, " tx39_cache");
if (cpu_has_octeon_cache) if (cpu_has_octeon_cache)
seq_puts(m, " octeon_cache"); seq_puts(m, " octeon_cache");
if (raw_cpu_has_fpu) if (raw_cpu_has_fpu)
......
...@@ -128,7 +128,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, ...@@ -128,7 +128,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
p->thread.reg17 = kthread_arg; p->thread.reg17 = kthread_arg;
p->thread.reg29 = childksp; p->thread.reg29 = childksp;
p->thread.reg31 = (unsigned long) ret_from_kernel_thread; p->thread.reg31 = (unsigned long) ret_from_kernel_thread;
#if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX) #if defined(CONFIG_CPU_R3000)
status = (status & ~(ST0_KUP | ST0_IEP | ST0_IEC)) | status = (status & ~(ST0_KUP | ST0_IEP | ST0_IEC)) |
((status & (ST0_KUC | ST0_IEC)) << 2); ((status & (ST0_KUC | ST0_IEC)) << 2);
#else #else
......
...@@ -64,4 +64,9 @@ int __init __dt_register_buses(const char *bus0, const char *bus1) ...@@ -64,4 +64,9 @@ int __init __dt_register_buses(const char *bus0, const char *bus1)
return 0; return 0;
} }
void __weak __init device_tree_init(void)
{
unflatten_and_copy_device_tree();
}
#endif #endif
...@@ -163,7 +163,8 @@ static __always_inline __init void check_mult_sh(void) ...@@ -163,7 +163,8 @@ static __always_inline __init void check_mult_sh(void)
} }
pr_cont("no.\n"); pr_cont("no.\n");
panic(bug64hit, !R4000_WAR ? r4kwar : nowar); panic(bug64hit,
IS_ENABLED(CONFIG_CPU_R4000_WORKAROUNDS) ? nowar : r4kwar);
} }
static volatile int daddi_ov; static volatile int daddi_ov;
...@@ -239,7 +240,8 @@ static __init void check_daddi(void) ...@@ -239,7 +240,8 @@ static __init void check_daddi(void)
} }
pr_cont("no.\n"); pr_cont("no.\n");
panic(bug64hit, !DADDI_WAR ? daddiwar : nowar); panic(bug64hit,
IS_ENABLED(CONFIG_CPU_DADDI_WORKAROUNDS) ? nowar : daddiwar);
} }
int daddiu_bug = -1; int daddiu_bug = -1;
...@@ -307,7 +309,8 @@ static __init void check_daddiu(void) ...@@ -307,7 +309,8 @@ static __init void check_daddiu(void)
} }
pr_cont("no.\n"); pr_cont("no.\n");
panic(bug64hit, !DADDI_WAR ? daddiwar : nowar); panic(bug64hit,
IS_ENABLED(CONFIG_CPU_DADDI_WORKAROUNDS) ? nowar : daddiwar);
} }
void __init check_bugs64_early(void) void __init check_bugs64_early(void)
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include <asm/sysmips.h> #include <asm/sysmips.h>
#include <asm/thread_info.h> #include <asm/thread_info.h>
#include <asm/unistd.h> #include <asm/unistd.h>
#include <asm/war.h>
#include <asm/asm-offsets.h> #include <asm/asm-offsets.h>
.align 5 .align 5
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include <asm/sysmips.h> #include <asm/sysmips.h>
#include <asm/thread_info.h> #include <asm/thread_info.h>
#include <asm/unistd.h> #include <asm/unistd.h>
#include <asm/war.h>
#ifndef CONFIG_MIPS32_COMPAT #ifndef CONFIG_MIPS32_COMPAT
/* Neither O32 nor N32, so define handle_sys here */ /* Neither O32 nor N32, so define handle_sys here */
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#include <asm/sim.h> #include <asm/sim.h>
#include <asm/ucontext.h> #include <asm/ucontext.h>
#include <asm/cpu-features.h> #include <asm/cpu-features.h>
#include <asm/war.h>
#include <asm/dsp.h> #include <asm/dsp.h>
#include <asm/inst.h> #include <asm/inst.h>
#include <asm/msa.h> #include <asm/msa.h>
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include <asm/ucontext.h> #include <asm/ucontext.h>
#include <asm/fpu.h> #include <asm/fpu.h>
#include <asm/cpu-features.h> #include <asm/cpu-features.h>
#include <asm/war.h>
#include "signal-common.h" #include "signal-common.h"
......
...@@ -2091,19 +2091,19 @@ static void *set_vi_srs_handler(int n, vi_handler_t addr, int srs) ...@@ -2091,19 +2091,19 @@ static void *set_vi_srs_handler(int n, vi_handler_t addr, int srs)
* If no shadow set is selected then use the default handler * If no shadow set is selected then use the default handler
* that does normal register saving and standard interrupt exit * that does normal register saving and standard interrupt exit
*/ */
extern char except_vec_vi, except_vec_vi_lui; extern const u8 except_vec_vi[], except_vec_vi_lui[];
extern char except_vec_vi_ori, except_vec_vi_end; extern const u8 except_vec_vi_ori[], except_vec_vi_end[];
extern char rollback_except_vec_vi; extern const u8 rollback_except_vec_vi[];
char *vec_start = using_rollback_handler() ? const u8 *vec_start = using_rollback_handler() ?
&rollback_except_vec_vi : &except_vec_vi; rollback_except_vec_vi : except_vec_vi;
#if defined(CONFIG_CPU_MICROMIPS) || defined(CONFIG_CPU_BIG_ENDIAN) #if defined(CONFIG_CPU_MICROMIPS) || defined(CONFIG_CPU_BIG_ENDIAN)
const int lui_offset = &except_vec_vi_lui - vec_start + 2; const int lui_offset = except_vec_vi_lui - vec_start + 2;
const int ori_offset = &except_vec_vi_ori - vec_start + 2; const int ori_offset = except_vec_vi_ori - vec_start + 2;
#else #else
const int lui_offset = &except_vec_vi_lui - vec_start; const int lui_offset = except_vec_vi_lui - vec_start;
const int ori_offset = &except_vec_vi_ori - vec_start; const int ori_offset = except_vec_vi_ori - vec_start;
#endif #endif
const int handler_len = &except_vec_vi_end - vec_start; const int handler_len = except_vec_vi_end - vec_start;
if (handler_len > VECTORSPACING) { if (handler_len > VECTORSPACING) {
/* /*
...@@ -2311,7 +2311,7 @@ void per_cpu_trap_init(bool is_boot_cpu) ...@@ -2311,7 +2311,7 @@ void per_cpu_trap_init(bool is_boot_cpu)
} }
/* Install CPU exception handler */ /* Install CPU exception handler */
void set_handler(unsigned long offset, void *addr, unsigned long size) void set_handler(unsigned long offset, const void *addr, unsigned long size)
{ {
#ifdef CONFIG_CPU_MICROMIPS #ifdef CONFIG_CPU_MICROMIPS
memcpy((void *)(ebase + offset), ((unsigned char *)addr - 1), size); memcpy((void *)(ebase + offset), ((unsigned char *)addr - 1), size);
......
...@@ -84,11 +84,6 @@ void __init plat_mem_setup(void) ...@@ -84,11 +84,6 @@ void __init plat_mem_setup(void)
__dt_setup_arch(dtb); __dt_setup_arch(dtb);
} }
void __init device_tree_init(void)
{
unflatten_and_copy_device_tree();
}
void __init prom_init(void) void __init prom_init(void)
{ {
/* call the soc specific detetcion code and get it to fill soc_info */ /* call the soc specific detetcion code and get it to fill soc_info */
......
...@@ -13,7 +13,6 @@ lib-$(CONFIG_GENERIC_CSUM) := $(filter-out csum_partial.o, $(lib-y)) ...@@ -13,7 +13,6 @@ lib-$(CONFIG_GENERIC_CSUM) := $(filter-out csum_partial.o, $(lib-y))
obj-$(CONFIG_CPU_GENERIC_DUMP_TLB) += dump_tlb.o obj-$(CONFIG_CPU_GENERIC_DUMP_TLB) += dump_tlb.o
obj-$(CONFIG_CPU_R3000) += r3k_dump_tlb.o obj-$(CONFIG_CPU_R3000) += r3k_dump_tlb.o
obj-$(CONFIG_CPU_TX39XX) += r3k_dump_tlb.o
# libgcc-style stuff needed in the kernel # libgcc-style stuff needed in the kernel
obj-y += bswapsi.o bswapdi.o multi3.o obj-y += bswapsi.o bswapdi.o multi3.o
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include <asm/asm.h> #include <asm/asm.h>
#include <asm/compiler.h> #include <asm/compiler.h>
#include <asm/war.h>
#ifndef CONFIG_CPU_DADDI_WORKAROUNDS #ifndef CONFIG_CPU_DADDI_WORKAROUNDS
#define GCC_DADDI_IMM_ASM() "I" #define GCC_DADDI_IMM_ASM() "I"
......
...@@ -14,15 +14,11 @@ ...@@ -14,15 +14,11 @@
#include <asm/page.h> #include <asm/page.h>
#include <asm/tlbdebug.h> #include <asm/tlbdebug.h>
extern int r3k_have_wired_reg;
void dump_tlb_regs(void) void dump_tlb_regs(void)
{ {
pr_info("Index : %0x\n", read_c0_index()); pr_info("Index : %0x\n", read_c0_index());
pr_info("EntryHi : %0lx\n", read_c0_entryhi()); pr_info("EntryHi : %0lx\n", read_c0_entryhi());
pr_info("EntryLo : %0lx\n", read_c0_entrylo0()); pr_info("EntryLo : %0lx\n", read_c0_entrylo0());
if (r3k_have_wired_reg)
pr_info("Wired : %0x\n", read_c0_wired());
} }
static void dump_tlb(int first, int last) static void dump_tlb(int first, int last)
......
...@@ -41,6 +41,7 @@ cflags-y += $(call cc-option,-mno-loongson-mmi) ...@@ -41,6 +41,7 @@ cflags-y += $(call cc-option,-mno-loongson-mmi)
# Loongson Machines' Support # Loongson Machines' Support
# #
cflags-$(CONFIG_MACH_LOONGSON2EF) += -I$(srctree)/arch/mips/include/asm/mach-loongson2ef -mno-branch-likely cflags-$(CONFIG_MACH_LOONGSON2EF) += -I$(srctree)/arch/mips/include/asm/mach-loongson2ef
cflags-$(CONFIG_CC_HAS_MNO_BRANCH_LIKELY) += -mno-branch-likely
load-$(CONFIG_LEMOTE_FULOONG2E) += 0xffffffff80100000 load-$(CONFIG_LEMOTE_FULOONG2E) += 0xffffffff80100000
load-$(CONFIG_LEMOTE_MACH2F) += 0xffffffff80200000 load-$(CONFIG_LEMOTE_MACH2F) += 0xffffffff80200000
...@@ -5,24 +5,9 @@ ...@@ -5,24 +5,9 @@
cflags-$(CONFIG_CPU_LOONGSON64) += -Wa,--trap cflags-$(CONFIG_CPU_LOONGSON64) += -Wa,--trap
# ifdef CONFIG_CPU_LOONGSON64
# binutils from v2.25 on and gcc starting from v4.9.0 treat -march=loongson3a cflags-$(CONFIG_CC_IS_GCC) += -march=loongson3a
# as MIPS64 R2; older versions as just R1. This leaves the possibility open cflags-$(CONFIG_CC_IS_CLANG) += -march=mips64r2
# that GCC might generate R2 code for -march=loongson3a which then is rejected
# by GAS. The cc-option can't probe for this behaviour so -march=loongson3a
# can't easily be used safely within the kbuild framework.
#
ifeq ($(call cc-ifversion, -ge, 0409, y), y)
ifeq ($(call ld-ifversion, -ge, 22500, y), y)
cflags-$(CONFIG_CPU_LOONGSON64) += \
$(call cc-option,-march=loongson3a -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64)
else
cflags-$(CONFIG_CPU_LOONGSON64) += \
$(call cc-option,-march=mips64r2,-mips64r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64)
endif
else
cflags-$(CONFIG_CPU_LOONGSON64) += \
$(call cc-option,-march=mips64r2,-mips64r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS64)
endif endif
# Some -march= flags enable MMI instructions, and GCC complains about that # Some -march= flags enable MMI instructions, and GCC complains about that
...@@ -33,5 +18,6 @@ cflags-y += $(call cc-option,-mno-loongson-mmi) ...@@ -33,5 +18,6 @@ cflags-y += $(call cc-option,-mno-loongson-mmi)
# Loongson Machines' Support # Loongson Machines' Support
# #
cflags-$(CONFIG_MACH_LOONGSON64) += -I$(srctree)/arch/mips/include/asm/mach-loongson64 -mno-branch-likely cflags-$(CONFIG_MACH_LOONGSON64) += -I$(srctree)/arch/mips/include/asm/mach-loongson64
cflags-$(CONFIG_CC_HAS_MNO_BRANCH_LIKELY) += -mno-branch-likely
load-$(CONFIG_CPU_LOONGSON64) += 0xffffffff80200000 load-$(CONFIG_CPU_LOONGSON64) += 0xffffffff80200000
...@@ -197,3 +197,13 @@ void __init prom_init_numa_memory(void) ...@@ -197,3 +197,13 @@ void __init prom_init_numa_memory(void)
prom_meminit(); prom_meminit();
} }
EXPORT_SYMBOL(prom_init_numa_memory); EXPORT_SYMBOL(prom_init_numa_memory);
pg_data_t * __init arch_alloc_nodedata(int nid)
{
return memblock_alloc(sizeof(pg_data_t), SMP_CACHE_BYTES);
}
void arch_refresh_nodedata(int nid, pg_data_t *pgdat)
{
__node_data[nid] = pgdat;
}
...@@ -36,11 +36,3 @@ void __init plat_mem_setup(void) ...@@ -36,11 +36,3 @@ void __init plat_mem_setup(void)
if (loongson_fdt_blob) if (loongson_fdt_blob)
__dt_setup_arch(loongson_fdt_blob); __dt_setup_arch(loongson_fdt_blob);
} }
void __init device_tree_init(void)
{
if (!initial_boot_params)
return;
unflatten_and_copy_device_tree();
}
...@@ -36,7 +36,6 @@ obj-$(CONFIG_CPU_R3K_TLB) += tlb-r3k.o ...@@ -36,7 +36,6 @@ obj-$(CONFIG_CPU_R3K_TLB) += tlb-r3k.o
obj-$(CONFIG_CPU_R4K_CACHE_TLB) += c-r4k.o cex-gen.o tlb-r4k.o obj-$(CONFIG_CPU_R4K_CACHE_TLB) += c-r4k.o cex-gen.o tlb-r4k.o
obj-$(CONFIG_CPU_R3000) += c-r3k.o obj-$(CONFIG_CPU_R3000) += c-r3k.o
obj-$(CONFIG_CPU_SB1) += c-r4k.o cerr-sb1.o cex-sb1.o tlb-r4k.o obj-$(CONFIG_CPU_SB1) += c-r4k.o cerr-sb1.o cex-sb1.o tlb-r4k.o
obj-$(CONFIG_CPU_TX39XX) += c-tx39.o
obj-$(CONFIG_CPU_CAVIUM_OCTEON) += c-octeon.o cex-oct.o tlb-r4k.o obj-$(CONFIG_CPU_CAVIUM_OCTEON) += c-octeon.o cex-oct.o tlb-r4k.o
obj-$(CONFIG_IP22_CPU_SCACHE) += sc-ip22.o obj-$(CONFIG_IP22_CPU_SCACHE) += sc-ip22.o
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <asm/r4kcache.h> #include <asm/r4kcache.h>
#include <asm/traps.h> #include <asm/traps.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/war.h>
#include <asm/octeon/octeon.h> #include <asm/octeon/octeon.h>
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include <asm/r4kcache.h> #include <asm/r4kcache.h>
#include <asm/sections.h> #include <asm/sections.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/war.h>
#include <asm/cacheflush.h> /* for run_uncached() */ #include <asm/cacheflush.h> /* for run_uncached() */
#include <asm/traps.h> #include <asm/traps.h>
#include <asm/mips-cps.h> #include <asm/mips-cps.h>
......
This diff is collapsed.
...@@ -195,11 +195,6 @@ void cpu_cache_init(void) ...@@ -195,11 +195,6 @@ void cpu_cache_init(void)
r4k_cache_init(); r4k_cache_init();
} }
if (cpu_has_tx39_cache) {
extern void __weak tx39_cache_init(void);
tx39_cache_init();
}
if (cpu_has_octeon_cache) { if (cpu_has_octeon_cache) {
extern void __weak octeon_cache_init(void); extern void __weak octeon_cache_init(void);
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include <asm/mipsregs.h> #include <asm/mipsregs.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/cpu.h> #include <asm/cpu.h>
#include <asm/war.h>
#ifdef CONFIG_SIBYTE_DMA_PAGEOPS #ifdef CONFIG_SIBYTE_DMA_PAGEOPS
#include <asm/sibyte/sb1250.h> #include <asm/sibyte/sb1250.h>
...@@ -103,7 +102,9 @@ static int cache_line_size; ...@@ -103,7 +102,9 @@ static int cache_line_size;
static inline void static inline void
pg_addiu(u32 **buf, unsigned int reg1, unsigned int reg2, unsigned int off) pg_addiu(u32 **buf, unsigned int reg1, unsigned int reg2, unsigned int off)
{ {
if (cpu_has_64bit_gp_regs && DADDI_WAR && r4k_daddiu_bug()) { if (cpu_has_64bit_gp_regs &&
IS_ENABLED(CONFIG_CPU_DADDI_WORKAROUNDS) &&
r4k_daddiu_bug()) {
if (off > 0x7fff) { if (off > 0x7fff) {
uasm_i_lui(buf, T9, uasm_rel_hi(off)); uasm_i_lui(buf, T9, uasm_rel_hi(off));
uasm_i_addiu(buf, T9, T9, uasm_rel_lo(off)); uasm_i_addiu(buf, T9, T9, uasm_rel_lo(off));
......
...@@ -36,8 +36,6 @@ extern void build_tlb_refill_handler(void); ...@@ -36,8 +36,6 @@ extern void build_tlb_refill_handler(void);
"nop\n\t" \ "nop\n\t" \
".set pop\n\t") ".set pop\n\t")
int r3k_have_wired_reg; /* Should be in cpu_data? */
/* TLB operations. */ /* TLB operations. */
static void local_flush_tlb_from(int entry) static void local_flush_tlb_from(int entry)
{ {
...@@ -62,7 +60,7 @@ void local_flush_tlb_all(void) ...@@ -62,7 +60,7 @@ void local_flush_tlb_all(void)
printk("[tlball]"); printk("[tlball]");
#endif #endif
local_irq_save(flags); local_irq_save(flags);
local_flush_tlb_from(r3k_have_wired_reg ? read_c0_wired() : 8); local_flush_tlb_from(8);
local_irq_restore(flags); local_irq_restore(flags);
} }
...@@ -224,34 +222,7 @@ void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1, ...@@ -224,34 +222,7 @@ void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
unsigned long old_ctx; unsigned long old_ctx;
static unsigned long wired = 0; static unsigned long wired = 0;
if (r3k_have_wired_reg) { /* TX39XX */ if (wired < 8) {
unsigned long old_pagemask;
unsigned long w;
#ifdef DEBUG_TLB
printk("[tlbwired<entry lo0 %8x, hi %8x\n, pagemask %8x>]\n",
entrylo0, entryhi, pagemask);
#endif
local_irq_save(flags);
/* Save old context and create impossible VPN2 value */
old_ctx = read_c0_entryhi() & asid_mask;
old_pagemask = read_c0_pagemask();
w = read_c0_wired();
write_c0_wired(w + 1);
write_c0_index(w << 8);
write_c0_pagemask(pagemask);
write_c0_entryhi(entryhi);
write_c0_entrylo0(entrylo0);
BARRIER;
tlb_write_indexed();
write_c0_entryhi(old_ctx);
write_c0_pagemask(old_pagemask);
local_flush_tlb_all();
local_irq_restore(flags);
} else if (wired < 8) {
#ifdef DEBUG_TLB #ifdef DEBUG_TLB
printk("[tlbwired<entry lo0 %8x, hi %8x\n>]\n", printk("[tlbwired<entry lo0 %8x, hi %8x\n>]\n",
entrylo0, entryhi); entrylo0, entryhi);
...@@ -272,13 +243,6 @@ void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1, ...@@ -272,13 +243,6 @@ void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1,
void tlb_init(void) void tlb_init(void)
{ {
switch (current_cpu_type()) {
case CPU_TX3922:
case CPU_TX3927:
r3k_have_wired_reg = 1;
write_c0_wired(0); /* Set to 8 on reset... */
break;
}
local_flush_tlb_from(0); local_flush_tlb_from(0);
build_tlb_refill_handler(); build_tlb_refill_handler();
} }
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/cpu-type.h> #include <asm/cpu-type.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/war.h>
#include <asm/uasm.h> #include <asm/uasm.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/tlbex.h> #include <asm/tlbex.h>
...@@ -2160,16 +2159,14 @@ static void build_r4000_tlb_load_handler(void) ...@@ -2160,16 +2159,14 @@ static void build_r4000_tlb_load_handler(void)
uasm_i_tlbr(&p); uasm_i_tlbr(&p);
switch (current_cpu_type()) { switch (current_cpu_type()) {
default:
if (cpu_has_mips_r2_exec_hazard) {
uasm_i_ehb(&p);
fallthrough;
case CPU_CAVIUM_OCTEON: case CPU_CAVIUM_OCTEON:
case CPU_CAVIUM_OCTEON_PLUS: case CPU_CAVIUM_OCTEON_PLUS:
case CPU_CAVIUM_OCTEON2: case CPU_CAVIUM_OCTEON2:
break; break;
} default:
if (cpu_has_mips_r2_exec_hazard)
uasm_i_ehb(&p);
break;
} }
/* Examine entrylo 0 or 1 based on ptr. */ /* Examine entrylo 0 or 1 based on ptr. */
...@@ -2236,15 +2233,14 @@ static void build_r4000_tlb_load_handler(void) ...@@ -2236,15 +2233,14 @@ static void build_r4000_tlb_load_handler(void)
uasm_i_tlbr(&p); uasm_i_tlbr(&p);
switch (current_cpu_type()) { switch (current_cpu_type()) {
default:
if (cpu_has_mips_r2_exec_hazard) {
uasm_i_ehb(&p);
case CPU_CAVIUM_OCTEON: case CPU_CAVIUM_OCTEON:
case CPU_CAVIUM_OCTEON_PLUS: case CPU_CAVIUM_OCTEON_PLUS:
case CPU_CAVIUM_OCTEON2: case CPU_CAVIUM_OCTEON2:
break; break;
} default:
if (cpu_has_mips_r2_exec_hazard)
uasm_i_ehb(&p);
break;
} }
/* Examine entrylo 0 or 1 based on ptr. */ /* Examine entrylo 0 or 1 based on ptr. */
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
# Copyright (C) 2008 Wind River Systems, Inc. # Copyright (C) 2008 Wind River Systems, Inc.
# written by Ralf Baechle <ralf@linux-mips.org> # written by Ralf Baechle <ralf@linux-mips.org>
# #
obj-y += malta-dt.o
obj-y += malta-dtshim.o obj-y += malta-dtshim.o
obj-y += malta-init.o obj-y += malta-init.o
obj-y += malta-int.o obj-y += malta-int.o
......
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2015 Imagination Technologies
* Author: Paul Burton <paul.burton@mips.com>
*/
#include <linux/clk-provider.h>
#include <linux/init.h>
#include <linux/of_fdt.h>
#include <linux/of_platform.h>
void __init device_tree_init(void)
{
unflatten_and_copy_device_tree();
}
...@@ -13,7 +13,6 @@ obj-$(CONFIG_PCI_DRIVERS_GENERIC)+= pci-generic.o ...@@ -13,7 +13,6 @@ obj-$(CONFIG_PCI_DRIVERS_GENERIC)+= pci-generic.o
obj-$(CONFIG_MIPS_BONITO64) += ops-bonito64.o obj-$(CONFIG_MIPS_BONITO64) += ops-bonito64.o
obj-$(CONFIG_PCI_GT64XXX_PCI0) += ops-gt64xxx_pci0.o obj-$(CONFIG_PCI_GT64XXX_PCI0) += ops-gt64xxx_pci0.o
obj-$(CONFIG_MIPS_MSC) += ops-msc.o obj-$(CONFIG_MIPS_MSC) += ops-msc.o
obj-$(CONFIG_SOC_TX3927) += ops-tx3927.o
obj-$(CONFIG_PCI_VR41XX) += ops-vr41xx.o pci-vr41xx.o obj-$(CONFIG_PCI_VR41XX) += ops-vr41xx.o pci-vr41xx.o
obj-$(CONFIG_PCI_TX4927) += ops-tx4927.o obj-$(CONFIG_PCI_TX4927) += ops-tx4927.o
obj-$(CONFIG_BCM47XX) += pci-bcm47xx.o obj-$(CONFIG_BCM47XX) += pci-bcm47xx.o
...@@ -46,7 +45,6 @@ obj-$(CONFIG_SOC_RT3883) += pci-rt3883.o ...@@ -46,7 +45,6 @@ obj-$(CONFIG_SOC_RT3883) += pci-rt3883.o
obj-$(CONFIG_TANBAC_TB0219) += fixup-tb0219.o obj-$(CONFIG_TANBAC_TB0219) += fixup-tb0219.o
obj-$(CONFIG_TANBAC_TB0226) += fixup-tb0226.o obj-$(CONFIG_TANBAC_TB0226) += fixup-tb0226.o
obj-$(CONFIG_TANBAC_TB0287) += fixup-tb0287.o obj-$(CONFIG_TANBAC_TB0287) += fixup-tb0287.o
obj-$(CONFIG_TOSHIBA_JMR3927) += fixup-jmr3927.o
obj-$(CONFIG_SOC_TX4927) += pci-tx4927.o obj-$(CONFIG_SOC_TX4927) += pci-tx4927.o
obj-$(CONFIG_SOC_TX4938) += pci-tx4938.o obj-$(CONFIG_SOC_TX4938) += pci-tx4938.o
obj-$(CONFIG_TOSHIBA_RBTX4927) += fixup-rbtx4927.o obj-$(CONFIG_TOSHIBA_RBTX4927) += fixup-rbtx4927.o
......
/*
*
* BRIEF MODULE DESCRIPTION
* Board specific pci fixups.
*
* Copyright 2001 MontaVista Software Inc.
* Author: MontaVista Software, Inc.
* ppopov@mvista.com or source@mvista.com
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <linux/types.h>
#include <asm/txx9/pci.h>
#include <asm/txx9/jmr3927.h>
int jmr3927_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{
unsigned char irq = pin;
/* IRQ rotation (PICMG) */
irq--; /* 0-3 */
if (slot == TX3927_PCIC_IDSEL_AD_TO_SLOT(23)) {
/* PCI CardSlot (IDSEL=A23, DevNu=12) */
/* PCIA => PCIC (IDSEL=A23) */
/* NOTE: JMR3927 JP1 must be set to OPEN */
irq = (irq + 2) % 4;
} else if (slot == TX3927_PCIC_IDSEL_AD_TO_SLOT(22)) {
/* PCI CardSlot (IDSEL=A22, DevNu=11) */
/* PCIA => PCIA (IDSEL=A22) */
/* NOTE: JMR3927 JP1 must be set to OPEN */
irq = (irq + 0) % 4;
} else {
/* PCI Backplane */
if (txx9_pci_option & TXX9_PCI_OPT_PICMG)
irq = (irq + 33 - slot) % 4;
else
irq = (irq + 3 + slot) % 4;
}
irq++; /* 1-4 */
switch (irq) {
case 1:
irq = JMR3927_IRQ_IOC_PCIA;
break;
case 2:
irq = JMR3927_IRQ_IOC_PCIB;
break;
case 3:
irq = JMR3927_IRQ_IOC_PCIC;
break;
case 4:
irq = JMR3927_IRQ_IOC_PCID;
break;
}
/* Check OnBoard Ethernet (IDSEL=A24, DevNu=13) */
if (dev->bus->parent == NULL &&
slot == TX3927_PCIC_IDSEL_AD_TO_SLOT(24))
irq = JMR3927_IRQ_ETHER0;
return irq;
}
/*
* Copyright 2001 MontaVista Software Inc.
* Author: MontaVista Software, Inc.
* ahennessy@mvista.com
*
* Copyright (C) 2000-2001 Toshiba Corporation
* Copyright (C) 2004 by Ralf Baechle (ralf@linux-mips.org)
*
* Based on arch/mips/ddb5xxx/ddb5477/pci_ops.c
*
* Define the pci_ops for TX3927.
*
* Much of the code is derived from the original DDB5074 port by
* Geert Uytterhoeven <geert@linux-m68k.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <asm/addrspace.h>
#include <asm/txx9irq.h>
#include <asm/txx9/pci.h>
#include <asm/txx9/tx3927.h>
static int mkaddr(struct pci_bus *bus, unsigned char devfn, unsigned char where)
{
if (bus->parent == NULL &&
devfn >= PCI_DEVFN(TX3927_PCIC_MAX_DEVNU, 0))
return -1;
tx3927_pcicptr->ica =
((bus->number & 0xff) << 0x10) |
((devfn & 0xff) << 0x08) |
(where & 0xfc) | (bus->parent ? 1 : 0);
/* clear M_ABORT and Disable M_ABORT Int. */
tx3927_pcicptr->pcistat |= PCI_STATUS_REC_MASTER_ABORT;
tx3927_pcicptr->pcistatim &= ~PCI_STATUS_REC_MASTER_ABORT;
return 0;
}
static inline int check_abort(void)
{
if (tx3927_pcicptr->pcistat & PCI_STATUS_REC_MASTER_ABORT) {
tx3927_pcicptr->pcistat |= PCI_STATUS_REC_MASTER_ABORT;
tx3927_pcicptr->pcistatim |= PCI_STATUS_REC_MASTER_ABORT;
/* flush write buffer */
iob();
return PCIBIOS_DEVICE_NOT_FOUND;
}
return PCIBIOS_SUCCESSFUL;
}
static int tx3927_pci_read_config(struct pci_bus *bus, unsigned int devfn,
int where, int size, u32 * val)
{
if (mkaddr(bus, devfn, where)) {
*val = 0xffffffff;
return PCIBIOS_DEVICE_NOT_FOUND;
}
switch (size) {
case 1:
*val = *(volatile u8 *) ((unsigned long) & tx3927_pcicptr->icd | (where & 3));
break;
case 2:
*val = le16_to_cpu(*(volatile u16 *) ((unsigned long) & tx3927_pcicptr->icd | (where & 3)));
break;
case 4:
*val = le32_to_cpu(tx3927_pcicptr->icd);
break;
}
return check_abort();
}
static int tx3927_pci_write_config(struct pci_bus *bus, unsigned int devfn,
int where, int size, u32 val)
{
if (mkaddr(bus, devfn, where))
return PCIBIOS_DEVICE_NOT_FOUND;
switch (size) {
case 1:
*(volatile u8 *) ((unsigned long) & tx3927_pcicptr->icd | (where & 3)) = val;
break;
case 2:
*(volatile u16 *) ((unsigned long) & tx3927_pcicptr->icd | (where & 2)) =
cpu_to_le16(val);
break;
case 4:
tx3927_pcicptr->icd = cpu_to_le32(val);
}
return check_abort();
}
static struct pci_ops tx3927_pci_ops = {
.read = tx3927_pci_read_config,
.write = tx3927_pci_write_config,
};
void __init tx3927_pcic_setup(struct pci_controller *channel,
unsigned long sdram_size, int extarb)
{
unsigned long flags;
unsigned long io_base =
channel->io_resource->start + mips_io_port_base - IO_BASE;
unsigned long io_size =
channel->io_resource->end - channel->io_resource->start;
unsigned long io_pciaddr =
channel->io_resource->start - channel->io_offset;
unsigned long mem_base =
channel->mem_resource->start;
unsigned long mem_size =
channel->mem_resource->end - channel->mem_resource->start;
unsigned long mem_pciaddr =
channel->mem_resource->start - channel->mem_offset;
printk(KERN_INFO "TX3927 PCIC -- DID:%04x VID:%04x RID:%02x Arbiter:%s",
tx3927_pcicptr->did, tx3927_pcicptr->vid,
tx3927_pcicptr->rid,
extarb ? "External" : "Internal");
channel->pci_ops = &tx3927_pci_ops;
local_irq_save(flags);
/* Disable External PCI Config. Access */
tx3927_pcicptr->lbc = TX3927_PCIC_LBC_EPCAD;
#ifdef __BIG_ENDIAN
tx3927_pcicptr->lbc |= TX3927_PCIC_LBC_IBSE |
TX3927_PCIC_LBC_TIBSE |
TX3927_PCIC_LBC_TMFBSE | TX3927_PCIC_LBC_MSDSE;
#endif
/* LB->PCI mappings */
tx3927_pcicptr->iomas = ~(io_size - 1);
tx3927_pcicptr->ilbioma = io_base;
tx3927_pcicptr->ipbioma = io_pciaddr;
tx3927_pcicptr->mmas = ~(mem_size - 1);
tx3927_pcicptr->ilbmma = mem_base;
tx3927_pcicptr->ipbmma = mem_pciaddr;
/* PCI->LB mappings */
tx3927_pcicptr->iobas = 0xffffffff;
tx3927_pcicptr->ioba = 0;
tx3927_pcicptr->tlbioma = 0;
tx3927_pcicptr->mbas = ~(sdram_size - 1);
tx3927_pcicptr->mba = 0;
tx3927_pcicptr->tlbmma = 0;
/* Enable Direct mapping Address Space Decoder */
tx3927_pcicptr->lbc |= TX3927_PCIC_LBC_ILMDE | TX3927_PCIC_LBC_ILIDE;
/* Clear All Local Bus Status */
tx3927_pcicptr->lbstat = TX3927_PCIC_LBIM_ALL;
/* Enable All Local Bus Interrupts */
tx3927_pcicptr->lbim = TX3927_PCIC_LBIM_ALL;
/* Clear All PCI Status Error */
tx3927_pcicptr->pcistat = TX3927_PCIC_PCISTATIM_ALL;
/* Enable All PCI Status Error Interrupts */
tx3927_pcicptr->pcistatim = TX3927_PCIC_PCISTATIM_ALL;
/* PCIC Int => IRC IRQ10 */
tx3927_pcicptr->il = TX3927_IR_PCI;
/* Target Control (per errata) */
tx3927_pcicptr->tc = TX3927_PCIC_TC_OF8E | TX3927_PCIC_TC_IF8E;
/* Enable Bus Arbiter */
if (!extarb)
tx3927_pcicptr->pbapmc = TX3927_PCIC_PBAPMC_PBAEN;
tx3927_pcicptr->pcicmd = PCI_COMMAND_MASTER |
PCI_COMMAND_MEMORY |
PCI_COMMAND_IO |
PCI_COMMAND_PARITY | PCI_COMMAND_SERR;
local_irq_restore(flags);
}
static irqreturn_t tx3927_pcierr_interrupt(int irq, void *dev_id)
{
struct pt_regs *regs = get_irq_regs();
if (txx9_pci_err_action != TXX9_PCI_ERR_IGNORE) {
printk(KERN_WARNING "PCI error interrupt at 0x%08lx.\n",
regs->cp0_epc);
printk(KERN_WARNING "pcistat:%02x, lbstat:%04lx\n",
tx3927_pcicptr->pcistat, tx3927_pcicptr->lbstat);
}
if (txx9_pci_err_action != TXX9_PCI_ERR_PANIC) {
/* clear all pci errors */
tx3927_pcicptr->pcistat |= TX3927_PCIC_PCISTATIM_ALL;
tx3927_pcicptr->istat = TX3927_PCIC_IIM_ALL;
tx3927_pcicptr->tstat = TX3927_PCIC_TIM_ALL;
tx3927_pcicptr->lbstat = TX3927_PCIC_LBIM_ALL;
return IRQ_HANDLED;
}
console_verbose();
panic("PCI error.");
}
void __init tx3927_setup_pcierr_irq(void)
{
if (request_irq(TXX9_IRQ_BASE + TX3927_IR_PCI,
tx3927_pcierr_interrupt,
0, "PCI error",
(void *)TX3927_PCIC_REG))
printk(KERN_WARNING "Failed to request irq for PCIERR\n");
}
...@@ -384,7 +384,7 @@ static int ar2315_pci_irq_map(struct irq_domain *d, unsigned irq, ...@@ -384,7 +384,7 @@ static int ar2315_pci_irq_map(struct irq_domain *d, unsigned irq,
return 0; return 0;
} }
static struct irq_domain_ops ar2315_pci_irq_domain_ops = { static const struct irq_domain_ops ar2315_pci_irq_domain_ops = {
.map = ar2315_pci_irq_map, .map = ar2315_pci_irq_map,
}; };
......
...@@ -78,14 +78,6 @@ void __init prom_init(void) ...@@ -78,14 +78,6 @@ void __init prom_init(void)
pic32_init_cmdline((int)fw_arg0, (char **)fw_arg1); pic32_init_cmdline((int)fw_arg0, (char **)fw_arg1);
} }
void __init device_tree_init(void)
{
if (!initial_boot_params)
return;
unflatten_and_copy_device_tree();
}
static struct pic32_sdhci_platform_data sdhci_data = { static struct pic32_sdhci_platform_data sdhci_data = {
.setup_dma = pic32_set_sdhci_adma_fifo_threshold, .setup_dma = pic32_set_sdhci_adma_fifo_threshold,
}; };
......
...@@ -61,6 +61,7 @@ static int __init ill_acc_of_setup(void) ...@@ -61,6 +61,7 @@ static int __init ill_acc_of_setup(void)
pdev = of_find_device_by_node(np); pdev = of_find_device_by_node(np);
if (!pdev) { if (!pdev) {
pr_err("%pOFn: failed to lookup pdev\n", np); pr_err("%pOFn: failed to lookup pdev\n", np);
of_node_put(np);
return -EINVAL; return -EINVAL;
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment