/* * Atheros AR71XX/AR724X/AR913X specific kernel entry setup * * Copyright (C) 2009 Gabor Juhos * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published * by the Free Software Foundation. * */ #ifndef __ASM_MACH_ATH79_KERNEL_ENTRY_H #define __ASM_MACH_ATH79_KERNEL_ENTRY_H /* * Some bootloaders set the 'Kseg0 coherency algorithm' to * 'Cacheable, noncoherent, write-through, no write allocate' * and this cause performance issues. Let's go and change it to * 'Cacheable, noncoherent, write-back, write allocate' */ .macro kernel_entry_setup mfc0 t0, CP0_CONFIG li t1, ~CONF_CM_CMASK and t0, t1 ori t0, CONF_CM_CACHABLE_NONCOHERENT mtc0 t0, CP0_CONFIG nop /* == AVM/JTR 20181119 Enable ULB and SL Bits in Config7 on Wasp platforms == */ #if defined(CONFIG_ATH79_MACH_AVM_WASP) && 0 mfc0 t0, $16, 7 ori t0, t0, 0x0011 mtc0 t0, $16, 7 nop #endif /* == AVM/JTR 20181212 Disable Return Branch Prediction, Prefetching and enable SUI on Wasp platforms == */ #if defined(CONFIG_ATH79_MACH_AVM_WASP) && 1 mfc0 t0, $16, 7 li t1, ~(3 << 11) /* Clear prefetch */ and t0, t0, t1 ori t0, t0, (1<<2) /* Disable Return Branch Prediction */ li t1,(1<<21) /* Enable Strict Uncached Instruction */ or t0,t0,t1 mtc0 t0, $16, 7 nop #endif .endm .macro smp_slave_setup .endm #endif /* __ASM_MACH_ATH79_KERNEL_ENTRY_H */