From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752947AbdLYRjL (ORCPT ); Mon, 25 Dec 2017 12:39:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:40066 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751684AbdLYRjI (ORCPT ); Mon, 25 Dec 2017 12:39:08 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4F787218C9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=krzk@kernel.org X-Google-Smtp-Source: ACJfBovIFHfSApxmc4fS4zxD3JO6ehJj1m+37fvVflYfraxRPX4WNb7Ti5CQ7MSwLahwCgmvhnP3ZO2MaT/iqD8B/QY= MIME-Version: 1.0 In-Reply-To: References: <1511749163-11057-1-git-send-email-yamada.masahiro@socionext.com> From: Krzysztof Kozlowski Date: Mon, 25 Dec 2017 18:39:05 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] ARM: make ARCH_S3C24XX select USE_OF and clean-up boot/dts/Makefile To: Masahiro Yamada Cc: arm-soc , Olof Johansson , Arnd Bergmann , devicetree@vger.kernel.org, Linux Kernel Mailing List , Rob Herring , Mark Rutland , Russell King , linux-arm-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Dec 24, 2017 at 6:19 PM, Masahiro Yamada wrote: > 2017-12-22 21:41 GMT+09:00 Krzysztof Kozlowski : >> On Mon, Nov 27, 2017 at 3:19 AM, Masahiro Yamada >> wrote: >>> ARCH_S3C24XX is a very exceptional platform that some DT files in >>> arch/arm/boot/dts/, but does not select USE_OF. >> >> Not entirely. The platform does select USE_OF - when MACH_S3C2416_DT >> is chosen. For other boards USE_OF is not necessary because they do >> not use DT. Why you need to select it for entire arch? >> >> Best regards, >> Krzysztof >> > > > The reason is simple - to avoid compile error. > > > If I simply drop ifeq ($(CONFIG_OF),y) > but do not select ARCH_S3C24XX, > s3c2410_defconfig failed to build. > > > $ make -s ARCH=arm mrproper > $ make -s ARCH=arm s3c2410_defconfig > $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- dtbs > ... > > DTC arch/arm/boot/dts/s3c2416-smdk2416.dtb > /bin/sh: 1: ./scripts/dtc/dtc: not found > scripts/Makefile.lib:310: recipe for target > 'arch/arm/boot/dts/s3c2416-smdk2416.dtb' failed > make[1]: *** [arch/arm/boot/dts/s3c2416-smdk2416.dtb] Error 127 > arch/arm/Makefile:349: recipe for target 'dtbs' failed > make: *** [dtbs] Error 2 > > > Another solution would be to enable dtb by CONFIG_MACH_S3C2416_DT. > > > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile > index d0381e9..950b5dd 100644 > --- a/arch/arm/boot/dts/Makefile > +++ b/arch/arm/boot/dts/Makefile > @@ -800,7 +798,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \ > rk3288-veyron-pinky.dtb \ > rk3288-veyron-speedy.dtb \ > rk3288-vyasa.dtb > -dtb-$(CONFIG_ARCH_S3C24XX) += \ > +dtb-$(CONFIG_MACH_S3C2416_DT) += \ > s3c2416-smdk2416.dtb > dtb-$(CONFIG_ARCH_S3C64XX) += \ > s3c6410-mini6410.dtb \ > > > > If you migrate S3C24XX platform to DT, > per-board CONFIG option will go away. > > So, I think dtb-$(CONFIG_ARCH_S3C24XX) is OK. I think this second solution - using CONFIG_MACH_S3C2416_DT - makes more sense because: 1, S3C24xx will not be converted to DT. This is a legacy platform. 2. DT version supports only part of boards and peripherals so most of existing platforms will use non-DT boardfiles. Enabling OF on all of them is not useful for them. 3. The same error and solution probably applies to MACH_S3C64XX. Best regards, Krzysztof