From patchwork Wed Feb 13 08:59:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 10809363 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EB2751390 for ; Wed, 13 Feb 2019 09:00:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D426E2C976 for ; Wed, 13 Feb 2019 09:00:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D1A622C9C8; Wed, 13 Feb 2019 09:00:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6D6EB2C9C8 for ; Wed, 13 Feb 2019 09:00:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zXIp/53lgdzvc9x6OpkQwnZprgFVGkNnBuzPaqUiEp4=; b=i4O0uBdV2OyAnK dsgZIpsANQdjZXZSNuz/Z0rPpqgHxwS4WKswCxyUDl7ArOPOsAJDspFkOt8v3eyC3uz+TtyxAcSfH dlyVbqo49uBZXHf5ruhWYWkaiqlH7KACylXfa9bzAul8D7umfcBtf8GTGsqwsOIQ8V/adrnPT9CY8 kSsyzCWjl7YyrE2fGV43vGUsKxTLgEz9BaFKFfxe9N0+08PNt05e5cy+rongr1xHWd+Lyh47GPPw1 U7Sxptxk5FqT+OxUBGMXep9qpscsZF0jMoIZ6BOso9DfQ5NONcJNPJimX+wIfYLywh+LnZJQOd2vV xXx3/s46UzPGjIr9DZjw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gtqPT-0007kW-32; Wed, 13 Feb 2019 09:00:51 +0000 Received: from esa6.microchip.iphmx.com ([216.71.154.253]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gtqOT-0005Hm-HW; Wed, 13 Feb 2019 08:59:51 +0000 X-IronPort-AV: E=Sophos;i="5.58,365,1544511600"; d="scan'208";a="23778134" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES128-SHA; 13 Feb 2019 01:59:47 -0700 Received: from NAM05-BY2-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.76.37) with Microsoft SMTP Server (TLS) id 14.3.352.0; Wed, 13 Feb 2019 01:59:47 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector1-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OY3mtMmnD9cseNMymdV/VsZoqf3XBJ/9J7higqgrd7I=; b=ifDZRPto/btI/cv1RaHs5GbnteEH5fsHqHRRJ8zW73Ff4BXv8nFQg1M1lp6qP9k1VBhdQpWyojpppwflXJVptSJtNHmzJ8B29m1w/BbAgyXnwTJfKzt9WLBNHtxVUUS2w8ykrsUHStXSlEz03nwK9xZqYbvlAlTpK3BOCTMqnrA= Received: from BN6PR11MB1842.namprd11.prod.outlook.com (10.175.98.146) by BN6PR11MB0019.namprd11.prod.outlook.com (10.161.155.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1622.16; Wed, 13 Feb 2019 08:59:45 +0000 Received: from BN6PR11MB1842.namprd11.prod.outlook.com ([fe80::847:4296:13b9:fc9f]) by BN6PR11MB1842.namprd11.prod.outlook.com ([fe80::847:4296:13b9:fc9f%8]) with mapi id 15.20.1601.023; Wed, 13 Feb 2019 08:59:45 +0000 From: To: , , , , , , , , , , , Subject: [PATCH 01/11] ARM: at91: add sam9x60 SFR definitions Thread-Topic: [PATCH 01/11] ARM: at91: add sam9x60 SFR definitions Thread-Index: AQHUw3p2o3oeiLqtBEORedY4SOk1lg== Date: Wed, 13 Feb 2019 08:59:44 +0000 Message-ID: <20190213085930.31578-2-tudor.ambarus@microchip.com> References: <20190213085930.31578-1-tudor.ambarus@microchip.com> In-Reply-To: <20190213085930.31578-1-tudor.ambarus@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR08CA0085.eurprd08.prod.outlook.com (2603:10a6:800:d3::11) To BN6PR11MB1842.namprd11.prod.outlook.com (2603:10b6:404:101::18) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Tudor.Ambarus@microchip.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.9.5 x-originating-ip: [94.177.32.154] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6c45e8f4-873d-4782-4292-08d691919920 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605077)(2017052603328)(7153060)(7193020); SRVR:BN6PR11MB0019; x-ms-traffictypediagnostic: BN6PR11MB0019: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; BN6PR11MB0019; 23:bsnb4tT4Z52Nz5HCeef55QLWwYqM6axbicSNtDx?= =?iso-8859-1?q?BFCaq3ZngDdzhew?= =?iso-8859-1?q?FJbt9vgihiyVCYh+eTWjwwrLCc3byTzs11kWjEMfe4y9j80qFjKuxN3B6/A4?= =?iso-8859-1?q?4ecC1zBJZXz+JR2NqlvM00i1P03xtDRCEaY5pQR0PVuz2Z5ncVubobyI34F1?= =?iso-8859-1?q?KKBb3Ibk96WVBHrAyMYZKyjIiWyDiiGJQH/mwHm6ondfgeFTj5Pxq6lckVCD?= =?iso-8859-1?q?/NRcYaI7oBt3MfIEcNMII9a6M7Acw6F0lcDxntxHRl4fdByVJf+0TSJR2lTe?= =?iso-8859-1?q?FYUuLcn8BFukNE4/PPMJDTgUdpSj6M60gMuD70l1UF7Jt+uxMdMgzhOg8q3F?= =?iso-8859-1?q?Z9IRweTHQZbXNFFlb8XR3UyX0GB3uz3o9VZp7/Iw1fI5xSC3rfqGlKSS6S4J?= =?iso-8859-1?q?QQDvpe+SS4+bvE7ZlsJAn8YeW3w0bcnVPvlP4ChX3RN5GzulIELF0TdKXQav?= =?iso-8859-1?q?x/LYAsgUA8Z2CxMpEQVfkiu6TIxOGGF334l9YZMrdqI7j4T/vPU/EDFojK60?= =?iso-8859-1?q?0IyFR+AzdIP05LAQ4ragErvtsvbODX29h47tT6roV3B2oIFdMefirhKOLgXh?= =?iso-8859-1?q?vyamWRPWNHfrolm0V4Rwr3V2JqRgD1HNIMpm4xNmq+7yI7sbZKQqLcSsaoth?= =?iso-8859-1?q?GuvzWAuzeuuHFJuRmTPVoQNs+FizUv9eUkRXP1N2V3dYsPwyhWVkSnpAIy+K?= =?iso-8859-1?q?Nv2tsx7RkPCPE8tIT56MdM/GJ97xQcnWjbVYu36goa2tm/kKrYo37O/YL8rd?= =?iso-8859-1?q?BDWNiFr8v2RWwSLwYdjf5oByt51SaRXA7tEePkdgcNfAug8vtvkLdV3BXzSV?= =?iso-8859-1?q?yU0+Kssv70xW+J/jP0dyLUITxassx3vqTmo3pDm+nnTw63sJ24zAz76octRQ?= =?iso-8859-1?q?KEM4rn6jWlKSQogcfrbc3vpf45+sSd9l+6PyNOHt33bJ0colzPCpGCOXdrWd?= =?iso-8859-1?q?1ZLPkQhyvnq8d9zx7YNhm1CHMaUHGnlGg7RNzkVStjBYUhyYl8N8bTo71SHw?= =?iso-8859-1?q?ZFNAvTa2P/jkM546+t803mCigOFWhicIDe/VE6rhKOReNox9wVxYfMv5jF3V?= =?iso-8859-1?q?ZV+3+no+OALoOrmZ/lwuOdMaAJ3TodVJTHYO5LJPOMcbdiGnkGbnRQpW7hv0?= =?iso-8859-1?q?nwVWZithbF0A8opZrdpq71El8dXtT0SA2HmVwOjcv3Az+6yFhDBbKRwP8Ff+?= =?iso-8859-1?q?5G6Umrj+aRyT/usTr9YUtLo5MC5Hain8aAQGKhAN3hfRog6Xmls8UbnfuCbI?= =?iso-8859-1?q?OWZ7c3YWOFfa4fY89cP3vwNA+A7K6P9WZTDJley6z7cH9n9dLkI7AWHbs+al?= =?iso-8859-1?q?tBZqKXACeqrXVvMNdH/VZrmwEO6oAc?= x-microsoft-antispam-prvs: x-forefront-prvs: 094700CA91 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(346002)(366004)(136003)(376002)(39860400002)(189003)(199004)(81166006)(50226002)(106356001)(7416002)(6436002)(54906003)(2201001)(1076003)(81156014)(26005)(110136005)(476003)(102836004)(107886003)(8936002)(6512007)(6486002)(4326008)(446003)(2616005)(316002)(8676002)(105586002)(99286004)(66066001)(486006)(6116002)(3846002)(186003)(11346002)(86362001)(2906002)(72206003)(71190400001)(14454004)(76176011)(53936002)(71200400001)(478600001)(68736007)(6506007)(386003)(2501003)(52116002)(97736004)(14444005)(7736002)(305945005)(256004)(25786009)(36756003)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR11MB0019; H:BN6PR11MB1842.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 1tJHhf5WCnkFrdvsOF3MrqwM5CoO8oP4vA8eSmYucAosizNOd/d0Zucgc28Mnnl2OCmaBldGHWVOnV0I5lQbeS0Cc31w49JYAKGY8X6lGRzWwMB6DIdVtKmQ1SkpEh8XjeAMykqcA0cw3N1tmpwWNbPC1hAvuv4tvOxDUNRF5n/vkkLLT3TluQtqPeUrbZYcrS7OZWeO3682XigilIUfjuTCEOtL/ONx8Zn8osyCYwDUxMz00gPBhmka9tIza/A89Ms57Vq3WaGGalu6Kzbyq2tv4fRp0k60hGmLSL1xWVFZwLu2qHucs7zrFbYVeK1WK6On3ID0zU4FvUWsD+q7/aTcaSNw+UcBLv7HiRRqUxOR+FQb17eQjRN84z/BBAD1xe3lk+X08yR/sYNcr93TmnskQLvfcRtm2yap8ans5jA= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 6c45e8f4-873d-4782-4292-08d691919920 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Feb 2019 08:59:41.6324 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB0019 X-OriginatorOrg: microchip.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190213_005949_614471_D868E66B X-CRM114-Status: UNSURE ( 8.42 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tudor.Ambarus@microchip.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Tudor Ambarus Keep generic names, as there are no conflicts with previous SFR definitions. While touching bits, update AT91_OHCIICR_USB_SUSPEND to use GENMASK, replace unused AT91_OHCIICR_SUSPEND_A/B/C with a more generic macro, align values on tab-width. Signed-off-by: Tudor Ambarus Acked-by: Alexandre Belloni --- include/soc/at91/atmel-sfr.h | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/include/soc/at91/atmel-sfr.h b/include/soc/at91/atmel-sfr.h index 482337af06b8..532fd784e86c 100644 --- a/include/soc/at91/atmel-sfr.h +++ b/include/soc/at91/atmel-sfr.h @@ -14,21 +14,41 @@ #define _LINUX_MFD_SYSCON_ATMEL_SFR_H #define AT91_SFR_DDRCFG 0x04 /* DDR Configuration Register */ +#define AT91_SFR_CCFG_EBICSA 0x04 /* EBI Chip Select Register */ /* 0x08 ~ 0x0c: Reserved */ #define AT91_SFR_OHCIICR 0x10 /* OHCI INT Configuration Register */ #define AT91_SFR_OHCIISR 0x14 /* OHCI INT Status Register */ #define AT91_SFR_UTMICKTRIM 0x30 /* UTMI Clock Trimming Register */ +#define AT91_SFR_UTMISWAP 0x3c /* UTMI DP/DM Pin Swapping Register */ +#define AT91_SFR_LS 0x7c /* Light Sleep Register */ #define AT91_SFR_I2SCLKSEL 0x90 /* I2SC Register */ +#define AT91_SFR_WPMR 0xe4 /* Write Protection Mode Register */ /* Field definitions */ -#define AT91_OHCIICR_SUSPEND_A BIT(8) -#define AT91_OHCIICR_SUSPEND_B BIT(9) -#define AT91_OHCIICR_SUSPEND_C BIT(10) +#define AT91_SFR_CCFG_EBI_CSA(cs, val) ((val) << (cs)) +#define AT91_SFR_CCFG_EBI_DBPUC BIT(8) +#define AT91_SFR_CCFG_EBI_DBPDC BIT(9) +#define AT91_SFR_CCFG_EBI_DRIVE BIT(17) +#define AT91_SFR_CCFG_NFD0_ON_D16 BIT(24) +#define AT91_SFR_CCFG_DDR_MP_EN BIT(25) -#define AT91_OHCIICR_USB_SUSPEND (AT91_OHCIICR_SUSPEND_A | \ - AT91_OHCIICR_SUSPEND_B | \ - AT91_OHCIICR_SUSPEND_C) +#define AT91_SFR_OHCIICR_RES(x) BIT(x) +#define AT91_SFR_OHCIICR_ARIE BIT(4) +#define AT91_SFR_OHCIICR_APPSTART BIT(5) +#define AT91_SFR_OHCIICR_USB_SUSP(x) BIT(8 + (x)) +#define AT91_SFR_OHCIICR_UDPPUDIS BIT(23) +#define AT91_OHCIICR_USB_SUSPEND GENMASK(10, 8) -#define AT91_UTMICKTRIM_FREQ GENMASK(1, 0) +#define AT91_SFR_OHCIISR_RIS(x) BIT(x) + +#define AT91_UTMICKTRIM_FREQ GENMASK(1, 0) + +#define AT91_SFR_UTMISWAP_PORT(x) BIT(x) + +#define AT91_SFR_LS_VALUE(x) BIT(x) +#define AT91_SFR_LS_MEM_POWER_GATING_ULP1_EN BIT(16) + +#define AT91_SFR_WPMR_WPEN BIT(0) +#define AT91_SFR_WPMR_WPKEY_MASK GENMASK(31, 8) #endif /* _LINUX_MFD_SYSCON_ATMEL_SFR_H */