Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: reset: fix K230 reset, fix K230 ISP DTS #165

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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