Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5545828yba; Wed, 10 Apr 2019 23:51:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqz9T8HgZDv03tjaAzxCLo3UHbXv7F1MGaHUHZjU8AcT6vwEg7WzKDcBHflc4AIlph2bbefC X-Received: by 2002:a62:3849:: with SMTP id f70mr48686998pfa.46.1554965501209; Wed, 10 Apr 2019 23:51:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554965501; cv=none; d=google.com; s=arc-20160816; b=d+rvIr0b4z4MhaOaIc/myivGMguIK2j0KpGEJh3NhIeWFMNO4CYIChUPEM98CvSLuT pAlaazEKGBPZjKQpAmXG6jEb3IE/HlBNcvcOmby7GDspEaEJWJH2ytvgOdhNG0F5WmDf +c3M8On9V5MU76SWAZ3JUtmMNmGCYyw/worWz1JkNk1zbkrYH2pf+2aJ1Of8uKMRA9dC 2y+WLUw+vN6kaiAtQzkdXGhrcSctfwSYXMGi8pW5r1U0HLbEQ15OuybzgB5N/sxau34M 6V82AqUrdE/jj1pkls0n+FFKPixIa6ojwbnAkEKwg0niwAkULjoUNw/qRLGEm0guNN9f CqVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=zMxeJQENe4MxlLJvvo6BuMS5uiNKaroK0JSJ2CA8Zus=; b=UZfuTM7jWKdEAdu+R9lftfjZYcAicCbg7lfhF8o0X0RNkyx+6/n36eiAvavfAs78MU Oimy8oFVXz7SvVPwIl1cOTLgqv9TUUv3RAMutU26z23aVP/l5GgXvvNJDdovdJTGF2ah oxESFDa/mutUTFPg/g0g7NbHDa+3ay3nd+A4K4T4TYgnPIHi21J3RhWk4Q+Bf28tjn4k MH5Hy7uKOuwqSMVW8/sedjFSoJYoHsjtjxkFW5RmO+QwbKOodbGgBOzZL3+9Rbv0xuhd Zy2HNisUsfJr/7rSxR/aFf0Ly31NO1FL+ZD+Qf8EcsYjBwAT9/K3stVs1kAgkHzgKUdP 3fZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=OtClyIki; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cc18si36329485plb.363.2019.04.10.23.51.25; Wed, 10 Apr 2019 23:51:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=OtClyIki; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726768AbfDKGtX (ORCPT + 99 others); Thu, 11 Apr 2019 02:49:23 -0400 Received: from mail-eopbgr00085.outbound.protection.outlook.com ([40.107.0.85]:64818 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726666AbfDKGtU (ORCPT ); Thu, 11 Apr 2019 02:49:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zMxeJQENe4MxlLJvvo6BuMS5uiNKaroK0JSJ2CA8Zus=; b=OtClyIkia6W59vCd0SP9Fhd6OKQZmlkvSagIqz3oMb7mz+GujhRCjQnxkrGPcVL81aEg5dNccZJ3L6ynSgAkZ7jeSU2UppgD3REYAaPXNc+dlhcBf6tjREJWgQwGkUSik4CFsD4Afz+PiOqD6ua9DUWuRU7qz4kht6eGzenN0o0= Received: from AM6PR0402MB3911.eurprd04.prod.outlook.com (52.133.30.10) by AM6PR0402MB3910.eurprd04.prod.outlook.com (52.133.29.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1771.18; Thu, 11 Apr 2019 06:49:13 +0000 Received: from AM6PR0402MB3911.eurprd04.prod.outlook.com ([fe80::7cb2:3013:bfa9:8ddd]) by AM6PR0402MB3911.eurprd04.prod.outlook.com ([fe80::7cb2:3013:bfa9:8ddd%4]) with mapi id 15.20.1771.016; Thu, 11 Apr 2019 06:49:13 +0000 From: Anson Huang To: "catalin.marinas@arm.com" , "will.deacon@arm.com" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , "heiko@sntech.de" , "horms+renesas@verge.net.au" , "olof@lixom.net" , Andy Gross , "bjorn.andersson@linaro.org" , "jagan@amarulasolutions.com" , "enric.balletbo@collabora.com" , "stefan.wahren@i2se.com" , "ezequiel@collabora.com" , "marc.w.gonzalez@free.fr" , "robh@kernel.org" , "l.stach@pengutronix.de" , Abel Vesa , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" CC: dl-linux-imx Subject: [PATCH 1/2] soc: imx-sc: add i.MX system controller soc driver support Thread-Topic: [PATCH 1/2] soc: imx-sc: add i.MX system controller soc driver support Thread-Index: AQHU8DKsAg9Kriz6B0mooDc33xId4w== Date: Thu, 11 Apr 2019 06:49:12 +0000 Message-ID: <1554965048-19450-1-git-send-email-Anson.Huang@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK0PR01CA0034.apcprd01.prod.exchangelabs.com (2603:1096:203:3e::22) To AM6PR0402MB3911.eurprd04.prod.outlook.com (2603:10a6:209:1c::10) authentication-results: spf=none (sender IP is ) smtp.mailfrom=anson.huang@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3dad51af-f545-4b4f-e4f0-08d6be49ce6e x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600139)(711020)(4605104)(4618075)(2017052603328)(7193020);SRVR:AM6PR0402MB3910; x-ms-traffictypediagnostic: AM6PR0402MB3910: x-ld-processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr x-microsoft-antispam-prvs: x-forefront-prvs: 00046D390F x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(346002)(136003)(396003)(366004)(39860400002)(199004)(189003)(105586002)(2501003)(97736004)(6116002)(53936002)(5660300002)(508600001)(71190400001)(7736002)(3846002)(6436002)(25786009)(2906002)(14454004)(6486002)(305945005)(4326008)(6512007)(81156014)(186003)(52116002)(486006)(102836004)(476003)(386003)(50226002)(8676002)(2616005)(36756003)(6506007)(8936002)(256004)(71200400001)(316002)(86362001)(99286004)(2201001)(81166006)(106356001)(66066001)(110136005)(68736007)(7416002)(26005)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR0402MB3910;H:AM6PR0402MB3911.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: NllsBW0ExJCDxKzBcQLXreDHmYMks2wBwBA7sOr6rFeCKc6s0EzsFc+a8Z54GG5xtUvHLHRozUPgck/SP/eSrjGxgZsIQyYVuMb5IgoybbOBKHyqvwCtUGt8wdg4hsSJjXdpOdVrql3k0n9F/nI/oKsiElreYzY8Rwtj+aIjQ/mO7Mv8u1Jfw5tkBin8oWH9PnoVKOLjGLk8wbe3qx69KnJehbqzWylbvpYjwX2hPxux9l9B3EzVrNANiHRruRiBAepAwX8Yea8wXtoypLG9ZzZSRZz4tqS2WZTVMq7LQfD9TUo2tVpcISzEoV/bsUjLSBFEb7N4dg9ypfQbbqWVPeGt3UBehG2eSp22ciO3X2D5N5JFWL7d90+r8yfapVWJWWiLW/HUJzfdCM1Jqg6iPPLCtXXOf/Pcq4lEhR/ZZ/M= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3dad51af-f545-4b4f-e4f0-08d6be49ce6e X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Apr 2019 06:49:12.9031 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3910 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org aS5NWDhRWFAgaXMgYW4gQVJNdjggU29DIHdoaWNoIGhhcyBhIENvcnRleC1NNCBzeXN0ZW0gY29u dHJvbGxlcg0KaW5zaWRlLCB0aGUgc3lzdGVtIGNvbnRyb2xsZXIgaXMgaW4gY2hhcmdlIG9mIGNv bnRyb2xsaW5nIHBvd2VyLA0KY2xvY2sgYW5kIGZ1c2UgZXRjLi4NCg0KVGhpcyBwYXRjaCBhZGRz IGkuTVggc3lzdGVtIGNvbnRyb2xsZXIgc29jIGRyaXZlciBzdXBwb3J0LA0KTGludXgga2VybmVs IGhhcyB0byBjb21tdW5pY2F0ZSB3aXRoIHN5c3RlbSBjb250cm9sbG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