aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/oxnas/files/arch/arm/mach-oxnas/fiq.S
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2018-05-31 17:28:38 +0200
committerDaniel Golle <daniel@makrotopia.org>2018-06-18 18:44:14 +0200
commit6f398aa76248dfdbd1ea31b8ef32431be0f762ee (patch)
treee9c8f6380fdabb0a5e00b6bdd335c9397e93b6ad /target/linux/oxnas/files/arch/arm/mach-oxnas/fiq.S
parentd6ee5e462c34a337a1b53994df5581a507e2c342 (diff)
downloadupstream-6f398aa76248dfdbd1ea31b8ef32431be0f762ee.tar.gz
upstream-6f398aa76248dfdbd1ea31b8ef32431be0f762ee.tar.bz2
upstream-6f398aa76248dfdbd1ea31b8ef32431be0f762ee.zip
oxnas: reboot target
Reboot the oxnas target based on Linux 4.14 by rebasing our support on top of the now-existing upstream kernel support. This commit brings oxnas support to the level of v4.17 having upstream drivers for Ethernet, Serial and NAND flash. Botch up OpenWrt's local drivers for EHCI, SATA and PCIe based on the new platform code and device-tree. Re-introduce base-files from old oxnas target which works for now but needs further clean-up towards generic board support. Functional issues: * PCIe won't come up (hence no USB3 on Shuttle KD20) * I2C bus of Akitio myCloud device is likely not to work (missing debounce support in new pinctrl driver) Code-style issues: * plla/pllb needs further cleanup -- currently their users are writing into the syscon regmap after acquireling the clk instead of using defined clk_*_*() functions to setup multipliers and dividors. * PCIe phy needs its own little driver. * SATA driver is a monster and should be split into an mfd having a raidctrl regmap, sata controller, sata ports and sata phy. Tested on MitraStar STG-212 aka. Medion Akoya MD86xxx and Shuttle KD20. Signed-off-by: Daniel Golle <daniel@makrotopia.org> (squash-picked commit 17511a7ea8 and commit dcc34574ef from master)
Diffstat (limited to 'target/linux/oxnas/files/arch/arm/mach-oxnas/fiq.S')
-rw-r--r--target/linux/oxnas/files/arch/arm/mach-oxnas/fiq.S87
1 files changed, 0 insertions, 87 deletions
diff --git a/target/linux/oxnas/files/arch/arm/mach-oxnas/fiq.S b/target/linux/oxnas/files/arch/arm/mach-oxnas/fiq.S
deleted file mode 100644
index 6acd5a7394..0000000000
--- a/target/linux/oxnas/files/arch/arm/mach-oxnas/fiq.S
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (C) 2012 Gateworks Corporation
- * Chris Lang <clang@gateworks.com>
- *
- * 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.
- */
-#include <linux/linkage.h>
-#include <asm/assembler.h>
-#include <asm/asm-offsets.h>
-
-#define D_CACHE_LINE_SIZE 32
-
- .text
-
-/*
- * R8 - DMA Start Address
- * R9 - DMA Length
- * R10 - DMA Direction
- * R11 - DMA type
- * R12 - fiq_buffer Address
-*/
-
- .global ox820_fiq_end
-ENTRY(ox820_fiq_start)
- str r8, [r13]
-
- ldmia r12, {r8, r9, r10}
- and r11, r10, #0x3000000
- and r10, r10, #0xff
-
- teq r11, #0x1000000
- beq ox820_dma_map_area
- teq r11, #0x2000000
- beq ox820_dma_unmap_area
- /* fall through */
-ox820_dma_flush_range:
- bic r8, r8, #D_CACHE_LINE_SIZE - 1
-1:
- mcr p15, 0, r8, c7, c14, 1 @ clean & invalidate D line
- add r8, r8, #D_CACHE_LINE_SIZE
- cmp r8, r9
- blo 1b
- /* fall through */
-ox820_fiq_exit:
- mov r8, #0
- str r8, [r12, #8]
- mcr p15, 0, r8, c7, c10, 4 @ drain write buffer
- subs pc, lr, #4
-
-ox820_dma_map_area:
- add r9, r9, r8
- teq r10, #DMA_FROM_DEVICE
- beq ox820_dma_inv_range
- teq r10, #DMA_TO_DEVICE
- bne ox820_dma_flush_range
- /* fall through */
-ox820_dma_clean_range:
- bic r8, r8, #D_CACHE_LINE_SIZE - 1
-1:
- mcr p15, 0, r8, c7, c10, 1 @ clean D line
- add r8, r8, #D_CACHE_LINE_SIZE
- cmp r8, r9
- blo 1b
- b ox820_fiq_exit
-
-ox820_dma_unmap_area:
- add r9, r9, r8
- teq r10, #DMA_TO_DEVICE
- beq ox820_fiq_exit
- /* fall through */
-ox820_dma_inv_range:
- tst r8, #D_CACHE_LINE_SIZE - 1
- bic r8, r8, #D_CACHE_LINE_SIZE - 1
- mcrne p15, 0, r8, c7, c10, 1 @ clean D line
- tst r9, #D_CACHE_LINE_SIZE - 1
- bic r9, r9, #D_CACHE_LINE_SIZE - 1
- mcrne p15, 0, r9, c7, c14, 1 @ clean & invalidate D line
-1:
- mcr p15, 0, r8, c7, c6, 1 @ invalidate D line
- add r8, r8, #D_CACHE_LINE_SIZE
- cmp r8, r9
- blo 1b
- b ox820_fiq_exit
-
-ox820_fiq_end: