Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932724AbbHJTIu (ORCPT ); Mon, 10 Aug 2015 15:08:50 -0400 Received: from mail-db3on0098.outbound.protection.outlook.com ([157.55.234.98]:4480 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932598AbbHJTIs convert rfc822-to-8bit (ORCPT ); Mon, 10 Aug 2015 15:08:48 -0400 From: Noam Camus To: Greg KH CC: "linux-kernel@vger.kernel.org" , "linux-serial@vger.kernel.org" Subject: RE: [v2 1/3] serial: 8250_dw: Add support for big-endian MMIO accesses Thread-Topic: [v2 1/3] serial: 8250_dw: Add support for big-endian MMIO accesses Thread-Index: AQHQx19a0QtXlIqW/06bv98s6sy7hp36/aMAgAnh4IA= Date: Mon, 10 Aug 2015 19:08:44 +0000 Message-ID: References: <1437557699-25722-1-git-send-email-noamc@ezchip.com> <1437886478-29273-1-git-send-email-noamc@ezchip.com> <1437886478-29273-2-git-send-email-noamc@ezchip.com> <20150803234326.GB5257@kroah.com> In-Reply-To: <20150803234326.GB5257@kroah.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=noamc@ezchip.com; x-originating-ip: [212.179.42.66] x-microsoft-exchange-diagnostics: 1;DB4PR02MB269;5:46/ebjgRFEct3g5okJv6R5OjP6Q9ZaVgKuqiNZEVFWOkvi+nniQmYr48tMlNfhF/7Wi5NxLjeboXAmzz/6ZDzVmGAcFQPeOL9jEnbna3lW2UVrrwTmNLCQbQu+lNSG2wPp0rT0hnE0ET8zIhMoxLNg==;24:BfNJGKo/hR6zWlYHhfNGZA3f6h32fDdWsodl8tx9gdg33iVbeVNVDl+R/k5D3NhYX3D2VASq5uGAsARc1qAHu0SqzFoAJccE4J6YlHX704o=;20:zyJTQxYJjkcOWZHzM8Ej0DnaBHE87524S4NK5+Lf06At5mPovKbJu9dWulNDNaZLLOr2CksH1GvWjv23fIkPow== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB4PR02MB269; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:DB4PR02MB269;BCL:0;PCL:0;RULEID:;SRVR:DB4PR02MB269; x-forefront-prvs: 06640999CA x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(189002)(199003)(377454003)(10400500002)(50986999)(5001960100002)(2950100001)(110136002)(189998001)(101416001)(105586002)(77156002)(40100003)(106116001)(122556002)(106356001)(62966003)(46102003)(5001830100001)(5003600100002)(5002640100001)(86362001)(66066001)(76176999)(87936001)(5001860100001)(2900100001)(19580395003)(93886004)(68736005)(76576001)(4001540100001)(33656002)(74316001)(81156007)(2656002)(64706001)(102836002)(97736004)(77096005)(54356999)(92566002)(19580405001);DIR:OUT;SFP:1101;SCL:1;SRVR:DB4PR02MB269;H:DB4PR02MB272.eurprd02.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT MIME-Version: 1.0 X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Aug 2015 19:08:44.7720 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0fc16e0a-3cd3-4092-8b2f-0a42cff122c3 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR02MB269 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1077 Lines: 26 From: Greg KH [mailto:greg@kroah.com] Sent: Tuesday, August 04, 2015 2:43 AM > > - writel(value, p->membase + (offset << p->regshift)); > Why drop this write? This was not dropped, it is now part of dw8250_serial_out32(). Now it is called before updating last_mcr. > > - writel(value, p->membase + (UART_LCR << p->regshift)); > > + if (p->iotype == UPIO_MEM32BE) > > + iowrite32be(value, > > + p->membase + (UART_LCR << p->regshift)); > > + else > > + writel(value, > > + p->membase + (UART_LCR << p->regshift)); > Shouldn't this be hidden behind some other type of accessor? Why is this one writel() "special"? I will add inner level accessors into "struct dw8250_data" for in32/out32. new accessors will be used in few places in this driver that still uses writel/readl without considering iotype. Noam-- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/