Skip to content

Commit

Permalink
drivers: reset: fix K230 reset, fix K230 ISP dts
Browse files Browse the repository at this point in the history
Signed-off-by: 黄子懿 <[email protected]>
  • Loading branch information
MrThanlon authored and RevySR committed Aug 6, 2024
1 parent 29ca31b commit f83d0bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arch/riscv/boot/dts/canaan/k230.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@
isp: isp.0 {
compatible = "verisilicon,isp";
id = <0>;
reg = <0x0 0x90000000 0x0 0x8000>;
reg = <0x0 0x90000000 0x0 0x9000>;
interrupts = <129 IRQ_TYPE_LEVEL_HIGH>,
<127 IRQ_TYPE_LEVEL_HIGH>,
<128 IRQ_TYPE_LEVEL_HIGH>;
Expand Down
4 changes: 2 additions & 2 deletions drivers/reset/reset-k230.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ static int k230_reset(struct reset_controller_dev *rcdev, unsigned long id)
reg = readl(rstc->membase + offset);
if ((offset == 0x20) || (offset == 0x24) || (offset == 0x80) ||
(offset == 0x64)) {
reg |= (0 << reset); //special,复位:reset=0
reg &= ~(1 << reset); //special,复位:reset=0
} else if ((offset == 0x4) || (offset == 0xc)) {
reg |= (1 << reset);
reg |= (1 << (reset + 0x10)); //note: write enable
Expand All @@ -161,7 +161,7 @@ static int k230_reset(struct reset_controller_dev *rcdev, unsigned long id)
reg &= ~(1 << reset);
writel(reg, rstc->membase + offset);
} else {
reg &= ~(0 << reset);
reg |= (1 << reset);
writel(reg, rstc->membase + offset);
}
}
Expand Down

0 comments on commit f83d0bb

Please sign in to comment.