From patchwork Tue Jul 14 16:33:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Welling X-Patchwork-Id: 6788091 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B8DEB9F2F0 for ; Tue, 14 Jul 2015 16:34:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CFC3A20634 for ; Tue, 14 Jul 2015 16:34:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CFA4320629 for ; Tue, 14 Jul 2015 16:34:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751691AbbGNQeU (ORCPT ); Tue, 14 Jul 2015 12:34:20 -0400 Received: from mail-ig0-f171.google.com ([209.85.213.171]:36636 "EHLO mail-ig0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751375AbbGNQeT (ORCPT ); Tue, 14 Jul 2015 12:34:19 -0400 Received: by igbij6 with SMTP id ij6so50617589igb.1; Tue, 14 Jul 2015 09:34:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=u1HB0s8k5novLmP4ZIcOtxSw48FZpyI1xpk4u0Qkvew=; b=T0qBk6U+qf4E/T9sVEfpMr+T2qGXyJlz9NaOfYFfgSd6azamGmStxVWI1lVaOlkvF8 f6mTNcHzWmfrtCY6ARQvHna0rhKMP3SKCtVP1dQ87G7yDYvRkwt3C89p0pGbsBIkwmuZ 8KO8uRUIpcPjZrpnayWa2j4DFVqj3kB8VNFh1+lsyiXlRTFow6FI6ZSScPzspYFhBjzc YQ7Lxq4tizzMvfSogvAqY6yRWVVZN6qssHrgNZy/raNQJWcV5hkdWgmttkHJro7sxyug WOQ15Xp+z6CF+XcNthanVMfhA0PKxI8IK+nNbrCznVccTPRHTPB/Jo4uQF4ZKWVij2U5 ZxXg== X-Received: by 10.107.10.167 with SMTP id 39mr13045105iok.0.1436891658993; Tue, 14 Jul 2015 09:34:18 -0700 (PDT) Received: from deathray (173-22-240-187.client.mchsi.com. [173.22.240.187]) by smtp.gmail.com with ESMTPSA id c12sm857810ioj.39.2015.07.14.09.34.17 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 14 Jul 2015 09:34:18 -0700 (PDT) Date: Tue, 14 Jul 2015 11:33:42 -0500 From: Michael Welling To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Sebastian Reichel , Tony Lindgren , Pavel Machek , Ivaylo Dimitrov , Aaro Koskinen , Nishanth Menon , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: linux 4.2-rc1 broken Nokia N900 Message-ID: <20150714163342.GA8512@deathray> References: <201507111405.06048@pali> <201507132234.22082@pali> <20150713215232.GA22584@deathray> <201507140002.44119@pali> <20150713223607.GA23001@deathray> <20150714071412.GA12844@pali> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20150714071412.GA12844@pali> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Jul 14, 2015 at 09:14:12AM +0200, Pali Rohár wrote: > On Monday 13 July 2015 17:36:07 Michael Welling wrote: > > On Tue, Jul 14, 2015 at 12:02:44AM +0200, Pali Rohár wrote: > > > I think nothing special. I just call: > > > > > > export ARCH=arm > > > export CROSS_COMPILE=arm-linux-gnueabi- > > > make rx51_defconfig > > > rm -f arch/arm/boot/zImage > > > make -j12 zImage modules omap3-n900.dtb CONFIG_DEBUG_SECTION_MISMATCH=y > > > cat arch/arm/boot/zImage arch/arm/boot/dts/omap3-n900.dtb > arch/arm/boot/zImage.new > > > mv arch/arm/boot/zImage.new arch/arm/boot/zImage > > > > > > > Where are you getting rx51_defconfig from? > > > > This does not appear to be in the kernel source any longer. > > > > Can you try the above with omap2plus_defconfig? > > > > It is in my linux-n900 repository: https://github.com/pali/linux-n900 > Repository contains more n900 specific patches but SPI code is unpatched > > https://github.com/pali/linux-n900/blob/HEAD/arch/arm/configs/rx51_defconfig > > Later in week I can try to compile also with omap2plus_defconfig... > But in my opinion kernel should not crash with different configuration. True. Could you try the following change to the set_cs function and see if it helps. --- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c index 5867384..666038b 100644 --- a/drivers/spi/spi-omap2-mcspi.c +++ b/drivers/spi/spi-omap2-mcspi.c @@ -245,16 +245,18 @@ static void omap2_mcspi_set_enable(const struct spi_device *spi, int enable) static void omap2_mcspi_set_cs(struct spi_device *spi, bool enable) { + struct omap2_mcspi_cs *cs = spi->controller_state; u32 l; - /* The controller handles the inverted chip selects - * using the OMAP2_MCSPI_CHCONF_EPOL bit so revert - * the inversion from the core spi_set_cs function. - */ - if (spi->mode & SPI_CS_HIGH) - enable = !enable; + if (cs) { + + /* The controller handles the inverted chip selects + * using the OMAP2_MCSPI_CHCONF_EPOL bit so revert + * the inversion from the core spi_set_cs function. + */ + if (spi->mode & SPI_CS_HIGH) + enable = !enable; - if (spi->controller_state) { l = mcspi_cached_chconf0(spi); if (enable)