Received: by 10.223.164.202 with SMTP id h10csp4843035wrb; Wed, 29 Nov 2017 12:50:17 -0800 (PST) X-Google-Smtp-Source: AGs4zMYZCkZhL7cQQ22vYCDLYVY125JQj2YqKGVF2nCwA2/gWOJPAgiL47+nM3nNFQ0E3lvUnEpU X-Received: by 10.99.189.65 with SMTP id d1mr177663pgp.104.1511988617213; Wed, 29 Nov 2017 12:50:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511988617; cv=none; d=google.com; s=arc-20160816; b=eMAsLFMLE+4IcjqavilDsKqiuQjMQiGN9zTmFnI0MCDO68JCQ8WCT/IC/xwm7mklco 92EKCw3Ca7qv59tYkZZZiFxTvNmU121sxNCrqGxYPVEdWMcZMOOIrMsA+tVZWuCl/bqM Crn46INyR+y2kqASvzlE1l1LuQMuhRac0NyYVxyqjwIoiWASfvenuc9h+8TUP5TG5jn9 iijDjakkmkLeyOxwyGBr/rcxPFgwGDlUj0SgrlK/SWtIAvf8xUPt/uMs6kIt7VVnP/dA lZeQhEXqdvpsELlP91wSccD3qr1akW6s6FB25zhgUyU0JMpiJdY/stOqwygwkfOM2A/7 2QDg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=yewChfBaSQsyJ5JhE1gHm8YPuVpHIZGKosli0ptzo7o=; b=v4yL5syLS31d3hvyycPTQdUZACIddRgokrEvHL6MwPnuue025kY9ndL7sAVyifXlSD EXGM6FgiaM3e6xXWx7FEm32BjSTFzvcS4SJjXhKpfe3zF+rkATLs8+dQ9zIVPLBl4xQ4 8WfHKdJRCvB2zY0mQTVlQp2Baz4dtLcwh191TU2UgR61Ed9RghaR5cpWcwRkdSy0shj/ IsseJPGle3dQPMLDKO/Wgy34q4CYwj+Jq/7fqATE/TzYEJlLVO7du8FjupxAhWypCtGC mfw6jPViaNQR5iMU0JRzeDyz+0H6rg2fh3/tHZd9ZE+2lTX71nlAaF2TT9G6TmQ5B7W1 zUyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RhvognMD; 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=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u9si1795691plr.580.2017.11.29.12.50.02; Wed, 29 Nov 2017 12:50:17 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=RhvognMD; 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=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752780AbdK2Us0 (ORCPT + 99 others); Wed, 29 Nov 2017 15:48:26 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33421 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751980AbdK2UsX (ORCPT ); Wed, 29 Nov 2017 15:48:23 -0500 Received: by mail-wm0-f66.google.com with SMTP id g130so37990556wme.0 for ; Wed, 29 Nov 2017 12:48:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=yewChfBaSQsyJ5JhE1gHm8YPuVpHIZGKosli0ptzo7o=; b=RhvognMD+c85Rg7PXUh7pWI9DFmi94HF30jWu6vikW57N6XCIHJL+w+9cLgI4x1mWz +zYMN6jui0hPcvI+dbM3Z+fg04WXRpCn0XZW/aO8bDHnChpb0gWknvnUqq5duCkZ9h3T ZO9lB9uLxKR3N/Xjr19E5WES3vp8l9rz2PJHhu/8UWMZyGFKjYf+h0udXxsnpwUht54A zQok1+1ozH0063PA9DiGp8ZPXAbrzen38mUF2Iy/zVQO+j87X+JK2D0d2nxNYkz46pH+ 8Nn0BLk4z9gD1m+XXdRK9tIbiEniODnzjPgYRbKoeGBrfAgyADyuf8ZlpoRedqLrBLNW RpCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=yewChfBaSQsyJ5JhE1gHm8YPuVpHIZGKosli0ptzo7o=; b=Vp/f+S+o82toBvIXxC5B0g9icej3xAHcPoZP+M5uwP0EyOHMiaThMg4w+Zp0uJYi5b h21pUo6io2Cnt0ECu9Awnu6wI9TBeES+hzqAgrsxxsFB9YGKO3wGNITEfazEv8lSP5Bq L119gx9O9EEgjxlK+HFvkL38XKiFuTTM2h0hCZOrNt42DcI0Gpo45/K00Tf0AbkBuPV1 xKOtjoqss6KwODeTImD/LWE/JIcAS68IncwEiUKNvRXDJBU/2JtQIG1FK4JjBUTZZUoL /b7YXArZyljTKYrZVILD68sK31kIK+pGXiToDiWaKxI2N7epNR0EGHu6HLhOxwMSfHrR RYEw== X-Gm-Message-State: AJaThX70LDguWnbBtzxvGF3s4LLa3iqD+2o16ak8AMg5jMzeYLodHCoc cPEJtR5SCkbHPaJALKUyvIs= X-Received: by 10.28.27.206 with SMTP id b197mr75156wmb.96.1511988501597; Wed, 29 Nov 2017 12:48:21 -0800 (PST) Received: from [192.168.1.221] ([195.245.52.78]) by smtp.gmail.com with ESMTPSA id j125sm4822549wmf.24.2017.11.29.12.48.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Nov 2017 12:48:20 -0800 (PST) Subject: Re: [PATCH v2 6/6] ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx derivative To: Lukasz Majewski , Arnd Bergmann , arndbergmann@gmail.com, Hartley Sweeten Cc: Russell King , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Olof Johansson , Linus Walleij References: <20171116232239.16823-1-lukma@denx.de> <20171121143204.1839-1-lukma@denx.de> <20171121143204.1839-7-lukma@denx.de> From: Alexander Sverdlin Message-ID: <86943b7f-be3a-2f41-1ffe-c4d7abfee148@gmail.com> Date: Wed, 29 Nov 2017 21:48:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20171121143204.1839-7-lukma@denx.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Lukasz, some nitpicking below... On 21/11/17 15:32, Lukasz Majewski wrote: > The BK3 board is a derivative of the ts72xx reference design. > > Signed-off-by: Lukasz Majewski > --- > Changes for v2: > - Place bk3 support code to the ts72xx.c file > --- > arch/arm/mach-ep93xx/Kconfig | 7 +++++ > arch/arm/mach-ep93xx/ts72xx.c | 64 +++++++++++++++++++++++++++++++++++++++++++ > arch/arm/mach-ep93xx/ts72xx.h | 5 ++++ > arch/arm/tools/mach-types | 1 + > 4 files changed, 77 insertions(+) > > diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig > index 61a75ca3684e..c095236d7ff8 100644 > --- a/arch/arm/mach-ep93xx/Kconfig > +++ b/arch/arm/mach-ep93xx/Kconfig > @@ -21,6 +21,13 @@ config MACH_ADSSPHERE > Say 'Y' here if you want your kernel to support the ADS > Sphere board. > > +config MACH_BK3 > + bool "Support Liebherr BK3.1" > + select MACH_TS72XX > + help > + Say 'Y' here if you want your kernel to support the > + Liebherr controller BK3.1. > + > config MACH_EDB93XX > bool > > diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c > index 2e8fcc6e87b6..0de19b136ad0 100644 > --- a/arch/arm/mach-ep93xx/ts72xx.c > +++ b/arch/arm/mach-ep93xx/ts72xx.c > @@ -18,8 +18,10 @@ > #include > #include > #include > +#include > > #include > +#include > > #include > #include > @@ -261,3 +263,65 @@ MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") > .init_late = ep93xx_init_late, > .restart = ep93xx_restart, > MACHINE_END > + > +/************************************************************************* > + * BK3 support code > + *************************************************************************/ > +static struct mtd_partition bk3_nand_parts[] = { > + { > + .name = "System", > + .offset = 0x00000000, I see the above and below lines as unaligned > + .size = 0x01e00000, > + }, { > + .name = "Data", > + .offset = 0x01e00000, same here > + .size = 0x05f20000 > + }, { > + .name = "RedBoot", > + .offset = 0x07d20000, same here > + .size = 0x002e0000, > + .mask_flags = MTD_WRITEABLE, /* force RO */ > + }, > +}; > + > +static AMBA_APB_DEVICE(i2s1, "apb:i2s", 1, EP93XX_I2S_PHYS_BASE, > + { IRQ_EP93XX_SAI }, NULL); > + > +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, same here > + .type = MT_DEVICE, > + } > +}; > + > +static void __init bk3_map_io(void) > +{ > + ts72xx_common_map_io(); > + iotable_init(bk3_io_desc, ARRAY_SIZE(bk3_io_desc)); > +} > + > +static void __init bk3_init_machine(void) > +{ > + ep93xx_init_devices(); > + > + ts72xx_register_flash(bk3_nand_parts, ARRAY_SIZE(bk3_nand_parts), > + EP93XX_CS6_PHYS_BASE); > + > + platform_device_register(&ts72xx_wdt_device); > + ep93xx_register_eth(&ts72xx_eth_data, 1); > + > + amba_device_register(&i2s1_device, &iomem_resource); > +} > + > +MACHINE_START(BK3, "Liebherr controller BK3.1") > + /* Maintainer: Lukasz Majewski */ Don't you want to add an entry to the MAINTAINERS file instead? Then get_maintainer.pl would be able to suggest your email. > + .atag_offset = 0x100, > + .map_io = bk3_map_io, again, inconsistent alignment... > + .init_irq = ep93xx_init_irq, > + .init_time = ep93xx_timer_init, > + .init_machine = bk3_init_machine, > + .init_late = ep93xx_init_late, > + .restart = ep93xx_restart, > +MACHINE_END > diff --git a/arch/arm/mach-ep93xx/ts72xx.h b/arch/arm/mach-ep93xx/ts72xx.h > index d9ff04db3221..d3165bb9ee78 100644 > --- a/arch/arm/mach-ep93xx/ts72xx.h > +++ b/arch/arm/mach-ep93xx/ts72xx.h > @@ -45,6 +45,11 @@ > #define TS72XX_WDT_CONTROL_PHYS_BASE 0x23800000 > #define TS72XX_WDT_FEED_PHYS_BASE 0x23c00000 > > +/* BK3 specific defines */ > +#define BK3_CPLDVER_PHYS_BASE 0x23400000 > +#define BK3_CPLDVER_VIRT_BASE 0xfebfd000 > +#define BK3_CPLDVER_SIZE 0x00001000 > + > #ifndef __ASSEMBLY__ > > static inline int ts72xx_model(void) > diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types > index a9313b66f770..4eac94c1eb6f 100644 > --- a/arch/arm/tools/mach-types > +++ b/arch/arm/tools/mach-types > @@ -345,6 +345,7 @@ mxlads MACH_MXLADS MXLADS 1851 > linkstation_mini MACH_LINKSTATION_MINI LINKSTATION_MINI 1858 > afeb9260 MACH_AFEB9260 AFEB9260 1859 > imx27ipcam MACH_IMX27IPCAM IMX27IPCAM 1871 > +bk3 MACH_BK3 BK3 1880 > rd88f6183ap_ge MACH_RD88F6183AP_GE RD88F6183AP_GE 1894 > realview_pba8 MACH_REALVIEW_PBA8 REALVIEW_PBA8 1897 > realview_pbx MACH_REALVIEW_PBX REALVIEW_PBX 1901 From 1584686502976364784@xxx Tue Nov 21 14:33:37 +0000 2017 X-GM-THRID: 1584299915922326607 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread