Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp261639ybt; Tue, 16 Jun 2020 23:43:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbPIlqMgVBwizK6QsYoPHMR+HXuqsbxO1k4mr+lO69wMeI1+R8m1DCXm/jdRm3sXK6SEhN X-Received: by 2002:a50:b022:: with SMTP id i31mr5976492edd.301.1592376213383; Tue, 16 Jun 2020 23:43:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592376213; cv=none; d=google.com; s=arc-20160816; b=c0/8ZPGNjLgeXEP4j1h6JnBbY/QSJtQl4FifhPqpHg6I6seY/9O38aTTaDh1gSQFMK RxiPcM9jqPhYM/3netpWkv/RJDdLbw5/o9S9Li1xk6+w8bKdxJM+TkRJxS7NzJra4TtL VE+hcVoj26aKhrZh0GpB7pMFuw76i4WmjtIvSbUz0tmk1Tpl4BFcnyxaHWTUhfF2R8Bi efM4Kk0Y8G7DAuc/Z+dGgv/Zuxvajjke/BlKZdMXi0/+6H0DcKUpr7WJRhBD7E0eeBWa jBwGNh2kV/MSejQwAErGeVAwmbaRkMQe8BOpuU158vmIVMeOUpsPGiZb8PcUIFVGfXaI RfCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=Yi8qckVCoc/BpINGsirl4HLvfSQpKF4ywGxOTUuDyXs=; b=t5hWFU+4bebTvRnICUuicFsr7utsYk8F4RxgnDHUbpKM5ufkLzGPfKzzeVWXX9oMG2 qL5eSL+V9OIHrO4sMEqrAjbaRPayOHeFMGTdcmQ0eIC2ORlYA/mzTP82Z1YQsE9eYSum jyqp26J3P1qgAp2w8JQ2foAYWQp0R8TvzfOSwgoVQcKcJjc25j/F6YFQBMSEQIQF2hbc P0GBmegE5eiXpDST7MWcBjRp9SqVrB/TbACzybSvmnMibG6nXkni+H6zZ6AZdylG2zOo ExMx5IQGGjvq6yBrvwbgFpgRyfqICPJmu9rB2uRTUNdPO0F6FLV+0xqouvIivtpyp40N okKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=SEgxChRf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gt26si12400719ejb.750.2020.06.16.23.43.09; Tue, 16 Jun 2020 23:43:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=SEgxChRf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726851AbgFQGjR (ORCPT + 99 others); Wed, 17 Jun 2020 02:39:17 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:57366 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725929AbgFQGjQ (ORCPT ); Wed, 17 Jun 2020 02:39:16 -0400 X-UUID: 7f818db80e15441b99f7a3d522cb58f9-20200617 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=Yi8qckVCoc/BpINGsirl4HLvfSQpKF4ywGxOTUuDyXs=; b=SEgxChRfS3LDVMAH8o9E5uWCg9fLjKKTSOErgn2Nj2djudDtMkh4zDkU8uJX0nPmQS6NEBwXHv2ChHZbeOUu8K7LK0FFvc6fOeMThRxRH/QQIjZ4/aeuPNQz/jC/uFUPYP2YcpGAaQnH/e2DRLpCjC9Ob3Dk6t6bo9lEd/5Rvek=; X-UUID: 7f818db80e15441b99f7a3d522cb58f9-20200617 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1088638800; Wed, 17 Jun 2020 14:39:12 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs02n2.mediatek.inc (172.21.101.101) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 17 Jun 2020 14:39:10 +0800 Received: from [172.21.77.4] (172.21.77.4) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 17 Jun 2020 14:39:09 +0800 Message-ID: <1592375950.27894.0.camel@mtksdaap41> Subject: Re: [PATCH v15 06/11] soc: mediatek: Add subsys clock control for bus protection From: Weiyi Lu To: Nicolas Boichat CC: Enric Balletbo Serra , Matthias Brugger , Rob Herring , Sascha Hauer , James Liao , Fan Chen , linux-arm Mailing List , lkml , Devicetree List , "moderated list:ARM/Mediatek SoC support" , srv_heupstream Date: Wed, 17 Jun 2020 14:39:10 +0800 In-Reply-To: References: <1590051985-29149-1-git-send-email-weiyi.lu@mediatek.com> <1590051985-29149-7-git-send-email-weiyi.lu@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: FDDAF576199A3C79306B7E064DC94874A65BB2656A13F2F45D65F88AF7F8449F2000:8 X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gVGh1LCAyMDIwLTA2LTA0IGF0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lbl0gPT0gJy0nKSkgew0KPiA+ICsgICAgICAgICAg ICAgICAgICAgICAgIGlmIChzdWJfY2xrX2NudCA+PSBNQVhfU1VCU1lTX0NMS1MpIHsNCj4gPiAr ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRldl9lcnIoJnBkZXYtPmRldiwNCj4gPiAr ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgInN1YnN5cyBjbGsgb3V0IG9m IHJhbmdlICVkXG4iLA0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBzdWJfY2xrX2NudCk7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1 cm4gLUVJTlZBTDsNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICB9DQo+ID4gKw0KPiA+ICsg ICAgICAgICAgICAgICAgICAgICAgIGNsa1tzdWJfY2xrX2NudF0gPSBkZXZtX2Nsa19nZXQoJnBk ZXYtPmRldiwNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBjbGtfbmFtZSk7DQo+ID4gKw0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgIGlmIChJ U19FUlIoY2xrW3N1Yl9jbGtfY250XSkpDQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICByZXR1cm4gUFRSX0VSUihjbGtbc3ViX2Nsa19jbnRdKTsNCj4gPiArDQo+ID4gKyAgICAg ICAgICAgICAgICAgICAgICAgc3ViX2Nsa19jbnQrKzsNCj4gPiArICAgICAgICAgICAgICAgfQ0K PiA+ICsgICAgICAgfQ0KPiA+ICsNCj4gPiArICAgICAgIHJldHVybiBzdWJfY2xrX2NudDsNCj4g PiArfQ0KPiA+ICsNCj4gPiAgc3RhdGljIGludCBpbml0X2Jhc2ljX2Nsa3Moc3RydWN0IHBsYXRm b3JtX2RldmljZSAqcGRldiwgc3RydWN0IGNsayAqKmNsaywNCj4gPiAgICAgICAgICAgICAgICAg ICAgICAgICBjb25zdCBjaGFyICogY29uc3QgKm5hbWUpDQo+ID4gIHsNCj4gPiBAQCAtNTk2LDYg KzY0MiwxOCBAQCBzdGF0aWMgc3RydWN0IHNjcCAqaW5pdF9zY3Aoc3RydWN0IHBsYXRmb3JtX2Rl dmljZSAqcGRldiwNCj4gPiAgICAgICAgICAgICAgICAgaWYgKHJldCkNCj4gPiAgICAgICAgICAg ICAgICAgICAgICAgICByZXR1cm4gRVJSX1BUUihyZXQpOw0KPiA+DQo+ID4gKyAgICAgICAgICAg ICAgIGlmIChkYXRhLT5zdWJzeXNfY2xrX3ByZWZpeCkgew0KPiA+ICsgICAgICAgICAgICAgICAg ICAgICAgIHJldCA9IGluaXRfc3Vic3lzX2Nsa3MocGRldiwNCj4gPiArICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS0+c3Vic3lzX2Nsa19wcmVmaXgsDQo+ID4gKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjcGQtPnN1YnN5c19jbGspOw0K PiA+ICsgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXQgPCAwKSB7DQo+ID4gKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBkZXZfZXJyKCZwZGV2LT5kZXYsDQo+ID4gKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICIlczogc3Vic3lzIGNsayB1bmF2YWlsYWJs ZVxuIiwNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS0+ bmFtZSk7DQo+IA0KPiBpbml0X3N1YnN5c19jbGtzIHNob3VsZCBhbHJlYWR5IGhhdmUgcHJpbnRl ZCBhbiBlcnJvciAoZGlyZWN0bHkgb3INCj4gaW5kaXJlY3RseSksIHNvIHRoaXMgaXMgbm90IG5l ZWRlZC4NCj4gDQoNCllvdSdyZSByaWdodC4gSSdsbCByZW1vdmUgaXQgaW4gbmV4dCB2ZXJzaW9u IHYxNi4NCg0KPiA+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEVSUl9Q VFIocmV0KTsNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICB9DQo+ID4gKyAgICAgICAgICAg ICAgIH0NCj4gPiArDQo+ID4gICAgICAgICAgICAgICAgIGdlbnBkLT5uYW1lID0gZGF0YS0+bmFt ZTsNCj4gPiAgICAgICAgICAgICAgICAgZ2VucGQtPnBvd2VyX29mZiA9IHNjcHN5c19wb3dlcl9v ZmY7DQo+ID4gICAgICAgICAgICAgICAgIGdlbnBkLT5wb3dlcl9vbiA9IHNjcHN5c19wb3dlcl9v bjsNCj4gPiAtLQ0KPiA+IDEuOC4xLjEuZGlydHkNCg0K