Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752600AbdLKW2R convert rfc822-to-8bit (ORCPT ); Mon, 11 Dec 2017 17:28:17 -0500 Received: from mail-sn1nam02on0101.outbound.protection.outlook.com ([104.47.36.101]:23991 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752521AbdLKW2P (ORCPT ); Mon, 11 Dec 2017 17:28:15 -0500 From: Hartley Sweeten To: Lukasz Majewski CC: Alexander Sverdlin , Arnd Bergmann , "arndbergmann@gmail.com" , "Russell King" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Olof Johansson , "Linus Walleij" Subject: RE: [PATCH v4 5/5] ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx derivative Thread-Topic: [PATCH v4 5/5] ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx derivative Thread-Index: AQHTajY8lZztAPYXakuz2bIYZ8/OaaM+cakggABLBICAAAfTsA== Date: Mon, 11 Dec 2017 22:28:12 +0000 Message-ID: References: <20171116232239.16823-1-lukma@denx.de> <20171130235140.12243-1-lukma@denx.de> <20171130235140.12243-6-lukma@denx.de> <20171211223941.744be82f@jawa> In-Reply-To: <20171211223941.744be82f@jawa> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [63.230.248.202] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;SN1PR0101MB1565;6:6KmKwOJIA6QZOBblNItwLQyCnFf2Rqgcpq8kmThhmFAWWpHarYbO5NSdrH9czG87mwxcNjqkC/li9K7lmeQay+y0gxWqQT7pIW7DHOhvaNse9yW0QIIBuExcL3+JniLFVTIhSgua3oylb03gqIa75KLUkWYuGnkASKAtSJtuctfB3ZifCZq3BI6w+WDns1LwTKjFnS/FvThd2iHRSqKOWgZsf8tR+jgI644l9atHe2iCMBJqzmcj41l8wTmvie36sk++0d4oEKDe3CZ+/WDmN6z9p572Blzb1s8HWxmMzLT5yP8zzP8GUKkYWyI4PDmfuiBXURrdIedipUpHE9us4Tawlgdj2ZpROjrXngkvLXM=;5:oQlTmopx9oi6OSsOoCQV+a7IB4V8Ar3I8EFUyTMl8geP4ZRzPPRFs2enaMKOn6AmsdOQPC5SEftPaFlC+/w0kNWcCjNaH15598Wjow/IruiDqlga5OVY4auRwvJZ5ZY1xmAGKkfNtrw/nNwKLqyNCusGEa+fM4PJEPcGDj7xnG4=;24:rBffbLBB/O3zmucXv9DiMcM8up4W9hAtE7tQOc0PCC3Fuc7SDvt/40DxcEScwEQxKEQJ6frBCIKRok2V/+pmxHcmoD/8MoGcUk3qLgVzGxY=;7:uQ/zMTNntqH34tbwhZFg1NmCpwH3Rmo583Lpq7fmJXtgiy5aTaLHgEETheCRZ6tolm9afkVW05dgs0176/ZgIRiB498OrqVabtcU1OnA2tmjposH8OpFdhJSoBpvyYQ3S3eFtJNEAOgTG9/3q9X5kEgN5fXOt7wYLDSrialQnyL3kSy+xGIf9b68tfZwKazsaRlK3sMtNBpeuy3BxJGFtbGAJJBMc5ipggi7IKhMId6BQg2L3EpWlk7asrQeZn7P x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: cf1f935e-ddd5-493f-6485-08d540e6772e x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(5600026)(4604075)(4534020)(4602075)(4603075)(4627115)(201702281549075)(2017052603307);SRVR:SN1PR0101MB1565; x-ms-traffictypediagnostic: SN1PR0101MB1565: authentication-results: spf=none (sender IP is ) smtp.mailfrom=HartleyS@visionengravers.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040450)(2401047)(8121501046)(5005006)(3002001)(3231023)(10201501046)(93006095)(93001095)(6041248)(20161123562025)(20161123555025)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(2016111802025)(6043046)(6072148)(201708071742011);SRVR:SN1PR0101MB1565;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:SN1PR0101MB1565; x-forefront-prvs: 0518EEFB48 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(346002)(376002)(189003)(24454002)(199004)(3280700002)(74316002)(66066001)(7736002)(105586002)(76176011)(7696005)(80792005)(2950100002)(81156014)(81166006)(33656002)(53546010)(106356001)(54906003)(229853002)(6916009)(478600001)(55016002)(68736007)(9686003)(77096006)(93886005)(5660300001)(14454004)(97736004)(2906002)(305945005)(6116002)(8676002)(8936002)(6246003)(4326008)(102836003)(6506006)(25786009)(2900100001)(39060400002)(3660700001)(3846002)(72206003)(86362001)(575784001)(316002)(53936002)(99286004)(6436002);DIR:OUT;SFP:1102;SCL:1;SRVR:SN1PR0101MB1565;H:SN1PR0101MB1565.prod.exchangelabs.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: visionengravers.com X-MS-Exchange-CrossTenant-Network-Message-Id: cf1f935e-ddd5-493f-6485-08d540e6772e X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Dec 2017 22:28:12.6946 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: d698601f-af92-4269-8099-fd6f11636477 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR0101MB1565 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3042 Lines: 85 On Monday, December 11, 2017 2:40 PM, Lukasz Majewski wrote: > Hi Hartley, > >> On Thursday, November 30, 2017 4:52 PM, Lukasz Majewski wrote: >>> >>> The BK3 board is a derivative of the ts72xx reference design. >> >> Lukasz, >> >> I was just reviewing the other TS-72xx boards and noticed this: >> >> >> >>> +/* BK3 specific defines */ >>> +#define BK3_CPLDVER_PHYS_BASE 0x23400000 >>> +#define BK3_CPLDVER_VIRT_BASE 0xfebfd000 >>> +#define BK3_CPLDVER_SIZE 0x00001000 >>> + >> >> >> >>> +static struct map_desc bk3_io_desc[] __initdata = { >>> + { >>> + .virtual = BK3_CPLDVER_VIRT_BASE, >>> + .pfn = >>> __phys_to_pfn(BK3_CPLDVER_PHYS_BASE), >>> + .length = BK3_CPLDVER_SIZE, >>> + .type = MT_DEVICE, >>> + } >>> +}; >>> + >> >> This register appears to be common to all the TS-72xx boards. > > The CPLD was used on the reference ts-72xx boards, but support for it seems > to not be present in the mainline kernel. The CPLD is not directly called out but some parts of it are supported in the mainline kernel. The RTC index and data registers are chip selected by the CPLD and Watchdog is in the CPLD. Also, the model number, options, and options2 registers are in the CPLD. There are a couple other registers in the CPLD that are not currently present in mainline. Some aren't because I haven't figured a good way to utilize them (the COM2 RS485 registers and the PC/104 memory/IO spaces) or they simply have not been necessary yet (the two status registers). There are a couple listed in the manuals that are specific to the TS-7260 that also have not been added. Basically, anything in the EP93xx CS1 or CS2 memory region is in or controlled by the CPLD. > Do you have a ts72xx board with CPLD embedded? Is any of your design using it? I have a stock TS-7300 board. > My another concern - is it safe to perform IO mapping on memory regions which are > not used / specified? The mapping is safe. If there is nothing at the address you just read back the static state (noise) of the bus and writing doesn't do anything. > When I do a single ts72xx mapping - for all boards - then we may end up with some > mappings which are not needed. True, but it's harmless and it keeps the platform init code cleaner. > With the code as it is - I only map regions which are already used on relevant boards. Yes, but this register in particular exists in the CPLD on all the TS-72xx boards. >> I don't think Arnd has pulled the series yet. Would you mind renaming >> the defines and rebasing this patch? > > If needed I can resend the patch series, or prepare a single fix patch. > No problem. Fixing it after Arnd merges your series is fine. I just wanted to make sure it was pointed out. BTW, is there a reason the BK3 board needs this register mapped? It was mapped in the Technologic Systems 2.4, 2.6, and 3.x kernels but I never found anything that used it. Of course the stock boards probably always had the same revision in the CPLD, the BK3 board might have multiple revisions... Hartley