From e04c24b69376633a6e034244cf0171fbf6d3128f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=AD=90=E6=87=BF?= Date: Tue, 6 Aug 2024 11:30:59 +0800 Subject: [PATCH] drivers: reset: fix K230 reset, fix K230 ISP dts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 黄子懿 --- arch/riscv/boot/dts/canaan/k230.dtsi | 2 +- drivers/reset/reset-k230.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/riscv/boot/dts/canaan/k230.dtsi b/arch/riscv/boot/dts/canaan/k230.dtsi index 585319d50c442..34c610d00f8d5 100644 --- a/arch/riscv/boot/dts/canaan/k230.dtsi +++ b/arch/riscv/boot/dts/canaan/k230.dtsi @@ -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>; diff --git a/drivers/reset/reset-k230.c b/drivers/reset/reset-k230.c index 013c4834f4baa..41c8e8941da0f 100644 --- a/drivers/reset/reset-k230.c +++ b/drivers/reset/reset-k230.c @@ -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 @@ -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); } }