From patchwork Mon Jan 6 08:57:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Sangorrin X-Patchwork-Id: 3436701 Return-Path: X-Original-To: patchwork-ltsi-dev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BC68BC02DC for ; Mon, 6 Jan 2014 08:57:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3A5342016A for ; Mon, 6 Jan 2014 08:57:16 +0000 (UTC) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) by mail.kernel.org (Postfix) with ESMTP id 9F35B20165 for ; Mon, 6 Jan 2014 08:57:14 +0000 (UTC) Received: from mail.linux-foundation.org (localhost [IPv6:::1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 77C474D4; Mon, 6 Jan 2014 08:57:14 +0000 (UTC) X-Original-To: ltsi-dev@lists.linuxfoundation.org Delivered-To: ltsi-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTP id 5F9AA4D4 for ; Mon, 6 Jan 2014 08:57:12 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from imx2.toshiba.co.jp (inet-tsb5.toshiba.co.jp [202.33.96.24]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 044B61F88B for ; Mon, 6 Jan 2014 08:57:10 +0000 (UTC) Received: from tsbmgw-mgw02.tsbmgw-mgw02.toshiba.co.jp ([133.199.200.50]) by imx2.toshiba.co.jp with ESMTP id s068v55f021982 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 6 Jan 2014 17:57:05 +0900 (JST) Received: from tsbmgw-mgw02 (localhost [127.0.0.1]) by tsbmgw-mgw02.tsbmgw-mgw02.toshiba.co.jp (8.13.8/8.14.5) with ESMTP id s068v52m031674; Mon, 6 Jan 2014 17:57:05 +0900 Received: from localhost ([127.0.0.1]) by tsbmgw-mgw02 (JAMES SMTP Server 2.3.1) with SMTP ID 766; Mon, 6 Jan 2014 17:57:05 +0900 (JST) Received: from arc1.toshiba.co.jp ([133.199.194.235]) by tsbmgw-mgw02.tsbmgw-mgw02.toshiba.co.jp (8.13.8/8.14.5) with ESMTP id s068v5TZ031668; Mon, 6 Jan 2014 17:57:05 +0900 Received: (from root@localhost) by arc1.toshiba.co.jp id s068v5HH010709; Mon, 6 Jan 2014 17:57:05 +0900 (JST) Received: from unknown [133.199.192.144] by arc1.toshiba.co.jp with ESMTP id TAA10708; Mon, 6 Jan 2014 17:57:05 +0900 Received: from mx11.toshiba.co.jp (localhost [127.0.0.1]) by ovp2.toshiba.co.jp with ESMTP id s068v4gW026290; Mon, 6 Jan 2014 17:57:04 +0900 (JST) Received: by toshiba.co.jp id s068v4QU008156; Mon, 6 Jan 2014 17:57:04 +0900 (JST) Message-Id: <201401060857.s068v4QU008156@toshiba.co.jp> Date: Mon, 06 Jan 2014 17:57:03 +0900 From: Daniel Sangorrin User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Daniel Sangorrin , Greg KH References: <1387865711-23124-1-git-send-email-daniel.sangorrin@toshiba.co.jp> <1387865711-23124-3-git-send-email-daniel.sangorrin@toshiba.co.jp> <20140105220535.GA17671@kroah.com> <201401060233.s062X0aS022388@toshiba.co.jp> <20140106032917.GA14466@kroah.com> <201401060809.s06895p7007659@toshiba.co.jp> In-Reply-To: <201401060809.s06895p7007659@toshiba.co.jp> X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org Cc: ltsi-dev@lists.linuxfoundation.org, michal.simek@xilinx.com Subject: Re: [LTSI-dev] [PATCH 02/12] i2c: si570: merge support for si570 clock generator X-BeenThere: ltsi-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: "A list to discuss patches, development, and other things related to the LTSI project" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ltsi-dev-bounces@lists.linuxfoundation.org Errors-To: ltsi-dev-bounces@lists.linuxfoundation.org X-Virus-Scanned: ClamAV using ClamSMTP On 2014/01/06 17:09, Daniel Sangorrin wrote: > On 2014/01/06 12:29, Greg KH wrote: >> On Mon, Jan 06, 2014 at 11:33:00AM +0900, Daniel Sangorrin wrote: >>> >>> >>> On 2014/01/06 7:05, Greg KH wrote: >>>> On Tue, Dec 24, 2013 at 03:15:01PM +0900, Daniel Sangorrin wrote: >>>>> From: Rob Armstrong >>>>> >>>>> This merges support for the si5790 clock generator from the Xilinx >>>>> repository (commit efc27505715e64526653f35274717c0fc56491e3 from >>>>> master branch). >>>>> >>>>> Signed-off-by: Daniel Sangorrin >>>>> Signed-off-by: Yoshitake Kobayashi >>>>> --- >>>>> drivers/misc/Kconfig | 10 + >>>>> drivers/misc/Makefile | 1 + >>>>> drivers/misc/si570.c | 576 ++++++++++++++++++++++++++++++++++++++++++++++ >>>>> include/linux/i2c/si570.h | 31 +++ >>>>> 4 files changed, 618 insertions(+) >>>>> create mode 100644 drivers/misc/si570.c >>>>> create mode 100644 include/linux/i2c/si570.h >>>>> >>>>> diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig >>>>> index c002d86..1c9fd72 100644 >>>>> --- a/drivers/misc/Kconfig >>>>> +++ b/drivers/misc/Kconfig >>>>> @@ -507,6 +507,16 @@ config USB_SWITCH_FSA9480 >>>>> stereo and mono audio, video, microphone and UART data to use >>>>> a common connector port. >>>>> >>>>> +config SI570 >>>>> + tristate "Silicon Labs Si570 Clock Generator" >>>>> + depends on I2C && SYSFS >>>>> + help >>>>> + If you say yes here you get support for the Silicon Labs Si570 >>>>> + digital clock generator. >>>>> + >>>>> + To compile this driver as a module, choose M here: the module >>>>> + will be called si570 >>>>> + >>>>> config LATTICE_ECP3_CONFIG >>>>> tristate "Lattice ECP3 FPGA bitstream configuration via SPI" >>>>> depends on SPI && SYSFS >>>>> diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile >>>>> index c235d5b..e84bcaa 100644 >>>>> --- a/drivers/misc/Makefile >>>>> +++ b/drivers/misc/Makefile >>>>> @@ -50,6 +50,7 @@ obj-y += carma/ >>>>> obj-$(CONFIG_USB_SWITCH_FSA9480) += fsa9480.o >>>>> obj-$(CONFIG_ALTERA_STAPL) +=altera-stapl/ >>>>> obj-$(CONFIG_INTEL_MEI) += mei/ >>>>> +obj-$(CONFIG_SI570) += si570.o >>>>> obj-$(CONFIG_VMWARE_VMCI) += vmw_vmci/ >>>>> obj-$(CONFIG_LATTICE_ECP3_CONFIG) += lattice-ecp3-config.o >>>>> obj-$(CONFIG_SRAM) += sram.o >>>>> diff --git a/drivers/misc/si570.c b/drivers/misc/si570.c >>>>> new file mode 100644 >>>>> index 0000000..30d8288 >>>>> --- /dev/null >>>>> +++ b/drivers/misc/si570.c >>>>> @@ -0,0 +1,576 @@ >>>>> +/* >>>>> + * Driver for Silicon Labs Si570/Si571 Programmable XO/VCXO >>>>> + * >>>>> + * Copyright (C) 2010, 2011 Ericsson AB. >>>>> + * Copyright (C) 2011 Guenter Roeck. >>>>> + * >>>>> + * Author: Guenter Roeck >>>>> + * >>>>> + * This program is free software; you can redistribute it and/or modify >>>>> + * it under the terms of the GNU General Public License as published by >>>>> + * the Free Software Foundation; either version 2 of the License, or >>>>> + * (at your option) any later version. >>>>> + * >>>>> + * This program is distributed in the hope that it will be useful, >>>>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of >>>>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >>>>> + * GNU General Public License for more details. >>>>> + */ >>>>> + >>>>> +#include >>>>> +#include >>>>> +#include >>>>> +#include >>>>> +#include >>>>> +#include >>>>> +#include >>>>> +#include >>>>> +#include >>>> >>>> This line breaks the build on the x86 platform, so I'm going to drop >>>> this whole patch, sorry. >>>> >>>> Please fix it up so that it builds properly and resend. >>> >>> Hi Greg, >>> >>> I just tested the x86 build with "make allyesconfig" and >>> "make i386_defconfig" (with SI570 enabled) and both of them >>> ended without problems on my machine. >>> >>> Could it be a collision against patches sent by other people? >> >> Ah, yes, it is due to patch 687b81d083c082bc1e853032e3a2a54f8c251d27 >> (from Linus's tree) in the LTSI tree now. You'll have to handle this >> when making this code work properly upstream, so might as well make the >> change now :) >> >> thanks, >> >> greg k-h >> >> > Hi Greg, > > I applied the LTSI patches on Linux 3.10.25 with quilt. > > Note: I noticed that I had to repeat the commands > 'quilt push -a -f' and 'quilt refresh' several > times because quilt was complaining (is that normal?). > > After applying all of the patches, and adding the > si570 patch as well, I managed to reproduce the problem with > the x86 build that you mentioned. > > I just had to remove that line (#include ) > to fix the x86 build. > > Unfortunately, I noticed that all ARM builds are in fact > broken with the current LTSI patches. This is the error message > that appears when I try to build an ARM kernel: > > CC arch/arm/kernel/setup.o > arch/arm/kernel/setup.c: In function 'customize_machine': > arch/arm/kernel/setup.c:686: error: implicit declaration of function 'of_platform_populate' > arch/arm/kernel/setup.c:686: error: 'of_default_bus_match_table' undeclared (first use in this function) > arch/arm/kernel/setup.c:686: error: (Each undeclared identifier is reported only once > arch/arm/kernel/setup.c:686: error: for each function it appears in.) > make[1]: *** [arch/arm/kernel/setup.o] Error 1 > make: *** [arch/arm/kernel] Error 2 > > After some research, I managed to track this down to the > following patch: > > #patches.baytrail/1134-of-remove-CONFIG_OF_DEVICE.patch > > If I ommit that patch, I can build the Zynq kernel (and > also other ARM board kernels which had the same problem) > without problems. Unfortunately there are two problems > with that too: > > 1.- The Zynq kernel mostly works but it seems > that I2C devices (eeprom, rtc) are not recognized > anymore. > 2.- 'make allyesconfig' fails again (probably some conflict > with other patches) > > Do you have any suggestion of how to fix this? > > Best regards > Daniel > Greg, The problem with ARM builds seems to be fixed by fixing of_platform.h (see patch below. I can prepare a proper patch tomorrow with cherry-picks from mainline if you want). Unfortunately, the problem with the I2C devices is still there. I will try to fix it tomorrow. diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index 2a93b64..55f0d80 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h @@ -13,8 +13,6 @@ #include #include - -#ifdef CONFIG_OF_DEVICE #include #include #include @@ -82,7 +80,6 @@ extern struct platform_device *of_device_alloc(struct device_node *np, struct device *parent); extern struct platform_device *of_find_device_by_node(struct device_node *np); -#ifdef CONFIG_OF_ADDRESS /* device reg helpers depend on OF_ADDRESS */ /* Platform devices and busses creation */ extern struct platform_device *of_platform_device_create(struct device_node *np, const char *bus_id, @@ -91,17 +88,12 @@ extern struct platform_device *of_platform_device_create(struct device_node * extern int of_platform_bus_probe(struct device_node *root, const struct of_device_id *matches, struct device *parent); +#ifdef CONFIG_OF_ADDRESS extern int of_platform_populate(struct device_node *root, const struct of_device_id *matches, const struct of_dev_auxdata *lookup, struct device *parent); -#endif /* CONFIG_OF_ADDRESS */ - -#endif /* CONFIG_OF_DEVICE */ - -#if !defined(CONFIG_OF_ADDRESS) -struct of_dev_auxdata; -struct device_node; +#else static inline int of_platform_populate(struct device_node *root, const struct of_device_id *matches, const struct of_dev_auxdata *lookup,