Skip to content

Commit

Permalink
package/hw-c910: Fixup ice dw axi dmac
Browse files Browse the repository at this point in the history
There are still some bugs block the dmac usage:
 - It's axi dmac not ahb dmac
 - Must reset dmac in gdbinit before startup
 - Some plics didn't have 128 interrupts, reduce to 80
 - Typo CONFIG_DMATEST not DWTEST

Signed-off-by: Guo Ren <[email protected]>
  • Loading branch information
guoren83 committed Jul 7, 2020
1 parent 3aa2e4e commit 6d6bb98
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions package/hw-c910/hw/gdbinit.ice.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ set $pmpaddr7 = 0xffffffffff >> 2
# Access needn't lock bit for the m state.
set $pmpcfg0 = 0x889800001b1b1f18

# Reset DW AXI DMAC
set *0x3fff78050 |= (1 << 0)

set $opensbi_addr = 0x00000000
set $vmlinux_addr = $opensbi_addr + 0x00200000
set $rootfs_addr = $opensbi_addr + 0x02000000
Expand Down
8 changes: 4 additions & 4 deletions package/hw-c910/hw/ice.dts.txt
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@
reg = <0x3 0xf0000000 0x0 0x04000000>;
reg-names = "control";
riscv,max-priority = <7>;
riscv,ndev = <128>;
riscv,ndev = <80>;
};

dummy_apb: apb-clock {
Expand Down Expand Up @@ -298,15 +298,15 @@
interrupts = <65>;
clocks = <&dummy_apb>, <&dummy_apb>;
clock-names = "core-clk", "cfgr-clk";

dma-channels = <8>;
snps,block-size = <65536 65536 65536 65536 65536 65536 65536 65536>;
snps,priority = <0 1 2 3 4 5 6 7>;
snps,dma-masters = <1>;
snps,data-width = <4>;
snps,axi-max-burst-len = <16>;
status = "ok";

status = "disabled";
};

gmac: ethernet@3fffc0000 {
Expand Down
4 changes: 2 additions & 2 deletions package/linux-patch-c910/linux-5.1.config.fragment
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ CONFIG_BLK_DEV_INITRD=y
CONFIG_DEBUG_ATOMIC_SLEEP=y

CONFIG_DMADEVICES=y
CONFIG_DW_DMAC=y
CONFIG_DWTEST=y
CONFIG_DW_AXI_DMAC=y
CONFIG_DMATEST=y

0 comments on commit 6d6bb98

Please sign in to comment.