From patchwork Fri Aug 9 14:40:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 170934 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp10100721ile; Fri, 9 Aug 2019 07:41:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqyi/GXEiRGd8FT63WkQ+rE5XEO25cfOAzcROxlSXi68DLWhksaPqi18c5AeXVhmRtG2TDeO X-Received: by 2002:a17:902:2ae7:: with SMTP id j94mr19378372plb.270.1565361710498; Fri, 09 Aug 2019 07:41:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565361710; cv=none; d=google.com; s=arc-20160816; b=U2iqu+QCxb65wyC6dPo3MFDasd5Br2YFQEjuoiFKiErE3hOX3dmnODEq8L6KHaP/B4 0ZwIjaCt76Y7TsiGnwDYkKG/BzAF/qFXOBNsjcCJw644+v5RrtM4uWRCQFOtzmFMmrOu azlJJDZKlD4i3kPsb+8n716JL48dTiHrzvZfDRQ4R26jm18hfxs1kIXEvnNhfycmrO3m VV1Nq8zfW6Q46eKOVmGrXfAb1oQfcdQB3YqbDp5CzykBdt0BD0VpfGNF4vBz3yAgPUNM dTE0lgTGWZ5Y7pDOTht4r/RHPc2Wnl5gpMvxOXcf4k0p1T814m87VKClten2bflul2IQ uRZA== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=+MjW19LWw7K3le3JhpgVPOky6pjd/vBWFZCHfFoeCtM=; b=kR9pHxENZXRowBROvQ9tpeyu/70oBLchgR5UOKpHXHX8w+1uO2i2HuBhdyHZbLFvyb EuWTIl9BHqqx0wfFobNM7JcgC6UZk9z0URtney/0eWkJw9BxPtioHctUZeBXTSEMZdDb 4Fg/gE9f9l2KhaR4H7z1bHjN0g5Axwf4RLEoj4hDrq4ijoSKck5Mj0EkCEmn2JhLAuh5 2wM96cRbA9UErR5DeY9v53q7ItKcAO2i4B1ELqD4PYvEionSp+0p9+iwZ3ZAoLTYYhjC aorOtWmcLgS+2QMdy54UGCXF0uWq1XizeY1oxN/rTiggBsVljv0F2JBeAjtI7XjAaUZ0 8Vrg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d8si58388717pfr.182.2019.08.09.07.41.50; Fri, 09 Aug 2019 07:41:50 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2436501AbfHIOlt (ORCPT + 28 others); Fri, 9 Aug 2019 10:41:49 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:54285 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726157AbfHIOls (ORCPT ); Fri, 9 Aug 2019 10:41:48 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPA (Nemesis) id 1Mvbr4-1iD4VT2f4w-00saWn; Fri, 09 Aug 2019 16:41:37 +0200 From: Arnd Bergmann To: soc@kernel.org Cc: Vladimir Zapolskiy , Sylvain Lemieux , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Greg Kroah-Hartman , Felipe Balbi , Alexandre Belloni , linux-usb@vger.kernel.org Subject: [PATCH v2 02/13] usb: udc: lpc32xx: allow compile-testing Date: Fri, 9 Aug 2019 16:40:28 +0200 Message-Id: <20190809144043.476786-3-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190809144043.476786-1-arnd@arndb.de> References: <20190809144043.476786-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:imKF8CYOdXNLcMsBRk3mkfe2XaXiYZ/dpgIAJ8vRCoyxvlRyj33 AVF5BJ04yO+4T850DaBd0tsnYRR8Kr57cnSNT3OeGpKfcEBIX8M9GQMwT1IUYdprcSqX4vO EeKrYORhADLbzjwUhXrKNiu9yK1kPe1XBmNsZb+rNlS3zJR9ml4+W8sWjKbu1DGbmJqJCp8 TP+LwRSu/+D+dPieDgwZw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:o+P30devlyk=:ZOux45NQXABh307CDaffwC eRRPJf8wFJnTFHt8ABbfXpKy4+2KstsbFkVk7tp+8vg4RTNo+M0qNZuHja9WiuljDwDeeHKcR JxyOvwefJYugKbJYpqRg2PBrMHB/XvtsyuqQMKg6MW0mGJk+wUbEB88paGrIS/Z4GIMor3210 qI/jAwzxrydt6db2oU8rWGakd4MF7/PQKoleMWB6eEL683yBW0UqbgyGETizPP/DAsE3BgaaY n1GFH9keXNXLp8Xhf+ZE5mBYr2ExNpKkbKCk5RA9MJQF4T0neuwFC91NWpUMkC4fvpBKNYttN DlXWhYa5RA59/nEeBjcnTVwhV0UVR+x1laNjs+CvutXhcstOZLZ4DLnirepeO2IjaKjkTB68E WPSCJLJS70sOdynJzhit1m7j49KEN77V/Yk0bExKwvI9+6INzhs/cKpqGC8EkE87qhzOfx1Jw VxkvqpnmJjGiEUJVi/fVAv4Izr3dwKSZ+Ahn9ePU0N9HLxPwbFcZoAKs3Ec+3zA5lIuQCzta0 at21vUSECg93O+CzFZY7g0meK28uC1IVZxzI0gQm8lkt0rXQuLIbK+fJekVelMDCWZF8IwghO cu0S6TwolJqo0s/Ne+Zpn138n5DzWwUfAxLpaeBExS5sdoIpkvdiiNDMLIql1FUOR+ONQbviM ICGimsocRL3e9CqZnT7W2tc+ve+MFAKwCFQ00cgCy+DbaPUGMxRxv4WBMRhZ2IJCB8oDAdLQX VyxbDTMn3knDPVcYN44yMWdFlMgOC1wRYKle3g== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The only thing that prevents building this driver on other platforms is the mach/hardware.h include, which is not actually used here at all, so remove the line and allow CONFIG_COMPILE_TEST. Acked-by: Greg Kroah-Hartman Acked-by: Sylvain Lemieux Signed-off-by: Arnd Bergmann --- drivers/usb/gadget/udc/Kconfig | 3 ++- drivers/usb/gadget/udc/lpc32xx_udc.c | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) -- 2.20.0 diff --git a/drivers/usb/gadget/udc/Kconfig b/drivers/usb/gadget/udc/Kconfig index ef0259a950ba..d354036ff6c8 100644 --- a/drivers/usb/gadget/udc/Kconfig +++ b/drivers/usb/gadget/udc/Kconfig @@ -45,7 +45,8 @@ config USB_AT91 config USB_LPC32XX tristate "LPC32XX USB Peripheral Controller" - depends on ARCH_LPC32XX && I2C + depends on ARCH_LPC32XX || COMPILE_TEST + depends on I2C select USB_ISP1301 help This option selects the USB device controller in the LPC32xx SoC. diff --git a/drivers/usb/gadget/udc/lpc32xx_udc.c b/drivers/usb/gadget/udc/lpc32xx_udc.c index 5f1b14f3e5a0..defe04d52e6d 100644 --- a/drivers/usb/gadget/udc/lpc32xx_udc.c +++ b/drivers/usb/gadget/udc/lpc32xx_udc.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -35,8 +36,6 @@ #include #endif -#include - /* * USB device configuration structure */ From patchwork Fri Aug 9 14:40:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 170938 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp10103118ile; Fri, 9 Aug 2019 07:43:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqy33vokfX4XE642EPLVM9i0Kxa0olP+au8zS+5TKcwC8+/rftaD4QY3vjcyr2HC/9D8FYw0 X-Received: by 2002:a65:448a:: with SMTP id l10mr17497988pgq.327.1565361831913; Fri, 09 Aug 2019 07:43:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565361831; cv=none; d=google.com; s=arc-20160816; b=ntghfE6HEwQmIbQkVBHtHFmU8OboEel4ql70ST7ZnUZXlYAo1+zjoxvam1EEg5eQcr WaDdEQdCBz6x5T1+KYL7kthCRU7E8rOszRdWeBAcecC8ZAyBR1hWET9iX9Vj/nmknWeG AMnuWoqRy5D7/QKS8kjWg3FonaB4LYwLw/p5an+XcFEUVClPFtihLiIS1aZ/l67RDb3e jxG6YJiHFcMG88OaUBkJ2sL5Q6s3A6kThFkwuv7+Mx+h+wFyQE/ddznCynGUJeNpDCMq UGCjfxNfMxgm7S0Q0IRK6luELb/c2HT7lyYDWXI+/XjQGJuTbIFwCms1LJQj82VPcwkH 858w== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=NYz6kLcbwBwFgXgwbw9LmCwkvNW4fMznlddtEwyJ/Bk=; b=IXucMF0PK4FvxnnBWeXfGJDYgE5EFR8K/kocd2K/TpztTWFl8CiXBfSnjigt1OlHKJ kkCdLD5wEre3cJhmo8/OQymgKxx7IX9QPEsdATeKcUZv/rZ63g08DWfHduopdHcnSaAn GqApQJHHkd3pfYxcVRMPRx8VNI6b4a5yZSgx0cSOQW/fEL4H2ghs7byh4JzH9GK62Yhs HfozPSFgWJy0lh+gOl3xTLY7VPUdJJF/0Aat2KILfrXVnWZZF+lN+nXY/ozRepsPxywY Kf8NIlWbNClCmjWgp+DMnj/EbLZ0NoVjFyNhlb3flFa+aa5mC422JBL2xwsHl3B9WQue iIcg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x24si4577315pjt.88.2019.08.09.07.43.51; Fri, 09 Aug 2019 07:43:51 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407100AbfHIOnu (ORCPT + 28 others); Fri, 9 Aug 2019 10:43:50 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:40867 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406320AbfHIOnu (ORCPT ); Fri, 9 Aug 2019 10:43:50 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPA (Nemesis) id 1N0qmr-1iGfMq1dTx-00wjWU; Fri, 09 Aug 2019 16:43:37 +0200 From: Arnd Bergmann To: soc@kernel.org Cc: Vladimir Zapolskiy , Sylvain Lemieux , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann , "David S. Miller" , netdev@vger.kernel.org Subject: [PATCH v2 06/13] net: lpc-enet: factor out iram access Date: Fri, 9 Aug 2019 16:40:32 +0200 Message-Id: <20190809144043.476786-7-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190809144043.476786-1-arnd@arndb.de> References: <20190809144043.476786-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:M1AYytHx6XmmunCKlV/TLUdpENpBqLRCGCD3Pn5cu9bj26l7VNZ ppTmd/I+r5hcLU0hmOjH/xyc/sS3WjXelutVyPcQXkf+1fcQuy0SLJgMYzoy3xLp7l3Kh1d 3Ql2Y8T6+WkkXw8dptJK85G1JUkG2GNTdVLR5WJAy5JJwbmIXNJts54TsFkP6dIVozEMZ30 oAx+HJ4EWfL59R8y6IhDw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:gYlz00sn4w0=:BqGN/DtzRwRepukBnvS5uD jtT5EKlubutzFsIn9CkuwmcuLmlSQeQonfrz6aRlQaSgiCPYs2v01l58RsrUsg3yrid6VbP/+ OkI19EJmhyt0Kqo7L2/z+4Fsjx8J+d+3MnCxMOjHxY6D25viimEAc8S9TWPa1PlK3k8GU3+lU vgZOe3DJ9z/1kocRjLJXBV7kpB1cRNZCxvkpnkzmklp1OsUj0sCGVyjSyb63RhsmVGVr2++nm PPdv6sSHoTqcSwzE/zleeDippUxx3OiEwpZMEYL5PNrBLauaqqna60c5uRDNi55XNdyJr+ABN Svztmjz1G/7PVk2O3uhNMVr4BHmBAjzdKVEA8c0rQXlP5JiBWm9cQBvEWLBwwU4aRPq2XJoOV vYVgJvxdRnzBbRBzmketRNlXZPS4742xUl1FkEnWibmAzWImR/UwuyJcaNJmChauTOldQ889O xjI/+djH1UHAzBhyEXaJILAKMTdNCSexIymg5cnGWSTLqTnGRvRCMHqZdYu3pQJrAlGDrMllQ +NjL6Y69+YAnXAoZHi00DvYNk1fJcA6vVrwtgySNB9PcK3I3gvpoiPbHmXmH+gfj+jHG5WL+R 93SdLp2QCCm5WRXPtDXksNACmUIpXISEX49NGsYEmdrF0DRp8ecH2ID/JnN//+6OEqmYyDkih tZGCcLBJBEtXih2po/Iy7XvCXe4HrG87vaH2dTegieCZinPcr0o3Z410szVqPXcNtnXsJ12fr EwlOhWlxH2qDnflSWNTk8zgSlxgyCC69ukAXdQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The lpc_eth driver uses a platform specific method to find the internal sram. This prevents building it on other machines. Rework to only use one function call and keep the other platform internals where they belong. Ideally this would look up the sram location from DT, but as this is a rarely used driver, I want to keep the modifications to a minimum. Signed-off-by: Arnd Bergmann --- arch/arm/mach-lpc32xx/common.c | 9 ++++++-- arch/arm/mach-lpc32xx/common.h | 1 - arch/arm/mach-lpc32xx/include/mach/board.h | 15 -------------- drivers/net/ethernet/nxp/lpc_eth.c | 17 ++++++++------- include/linux/soc/nxp/lpc32xx-misc.h | 24 ++++++++++++++++++++++ 5 files changed, 39 insertions(+), 27 deletions(-) delete mode 100644 arch/arm/mach-lpc32xx/include/mach/board.h create mode 100644 include/linux/soc/nxp/lpc32xx-misc.h -- 2.20.0 diff --git a/arch/arm/mach-lpc32xx/common.c b/arch/arm/mach-lpc32xx/common.c index 5b71b4fab2cd..f648324d5fb4 100644 --- a/arch/arm/mach-lpc32xx/common.c +++ b/arch/arm/mach-lpc32xx/common.c @@ -8,6 +8,7 @@ */ #include +#include #include #include @@ -32,7 +33,7 @@ void lpc32xx_get_uid(u32 devid[4]) */ #define LPC32XX_IRAM_BANK_SIZE SZ_128K static u32 iram_size; -u32 lpc32xx_return_iram_size(void) +u32 lpc32xx_return_iram(void __iomem **mapbase, dma_addr_t *dmaaddr) { if (iram_size == 0) { u32 savedval1, savedval2; @@ -53,10 +54,14 @@ u32 lpc32xx_return_iram_size(void) } else iram_size = LPC32XX_IRAM_BANK_SIZE * 2; } + if (dmaaddr) + *dmaaddr = LPC32XX_IRAM_BASE; + if (mapbase) + *mapbase = io_p2v(LPC32XX_IRAM_BASE); return iram_size; } -EXPORT_SYMBOL_GPL(lpc32xx_return_iram_size); +EXPORT_SYMBOL_GPL(lpc32xx_return_iram); static struct map_desc lpc32xx_io_desc[] __initdata = { { diff --git a/arch/arm/mach-lpc32xx/common.h b/arch/arm/mach-lpc32xx/common.h index 8e597ce48a73..32f0ad217807 100644 --- a/arch/arm/mach-lpc32xx/common.h +++ b/arch/arm/mach-lpc32xx/common.h @@ -23,7 +23,6 @@ extern void __init lpc32xx_serial_init(void); */ extern void lpc32xx_get_uid(u32 devid[4]); -extern u32 lpc32xx_return_iram_size(void); /* * Pointers used for sizing and copying suspend function data */ diff --git a/arch/arm/mach-lpc32xx/include/mach/board.h b/arch/arm/mach-lpc32xx/include/mach/board.h deleted file mode 100644 index 476513d970a4..000000000000 --- a/arch/arm/mach-lpc32xx/include/mach/board.h +++ /dev/null @@ -1,15 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ -/* - * arm/arch/mach-lpc32xx/include/mach/board.h - * - * Author: Kevin Wells - * - * Copyright (C) 2010 NXP Semiconductors - */ - -#ifndef __ASM_ARCH_BOARD_H -#define __ASM_ARCH_BOARD_H - -extern u32 lpc32xx_return_iram_size(void); - -#endif /* __ASM_ARCH_BOARD_H */ diff --git a/drivers/net/ethernet/nxp/lpc_eth.c b/drivers/net/ethernet/nxp/lpc_eth.c index f7e11f1b0426..bcdd0adcfb0c 100644 --- a/drivers/net/ethernet/nxp/lpc_eth.c +++ b/drivers/net/ethernet/nxp/lpc_eth.c @@ -18,8 +18,8 @@ #include #include #include +#include -#include #include #include @@ -1311,16 +1311,15 @@ static int lpc_eth_drv_probe(struct platform_device *pdev) /* Get size of DMA buffers/descriptors region */ pldat->dma_buff_size = (ENET_TX_DESC + ENET_RX_DESC) * (ENET_MAXF_SIZE + sizeof(struct txrx_desc_t) + sizeof(struct rx_status_t)); - pldat->dma_buff_base_v = 0; if (use_iram_for_net(dev)) { - dma_handle = LPC32XX_IRAM_BASE; - if (pldat->dma_buff_size <= lpc32xx_return_iram_size()) - pldat->dma_buff_base_v = - io_p2v(LPC32XX_IRAM_BASE); - else + if (pldat->dma_buff_size > + lpc32xx_return_iram(&pldat->dma_buff_base_v, &dma_handle)) { + pldat->dma_buff_base_v = NULL; + pldat->dma_buff_size = 0; netdev_err(ndev, "IRAM not big enough for net buffers, using SDRAM instead.\n"); + } } if (pldat->dma_buff_base_v == 0) { @@ -1409,7 +1408,7 @@ static int lpc_eth_drv_probe(struct platform_device *pdev) unregister_netdev(ndev); err_out_dma_unmap: if (!use_iram_for_net(dev) || - pldat->dma_buff_size > lpc32xx_return_iram_size()) + pldat->dma_buff_size > lpc32xx_return_iram(NULL, NULL)) dma_free_coherent(dev, pldat->dma_buff_size, pldat->dma_buff_base_v, pldat->dma_buff_base_p); @@ -1436,7 +1435,7 @@ static int lpc_eth_drv_remove(struct platform_device *pdev) unregister_netdev(ndev); if (!use_iram_for_net(&pldat->pdev->dev) || - pldat->dma_buff_size > lpc32xx_return_iram_size()) + pldat->dma_buff_size > lpc32xx_return_iram(NULL, NULL)) dma_free_coherent(&pldat->pdev->dev, pldat->dma_buff_size, pldat->dma_buff_base_v, pldat->dma_buff_base_p); diff --git a/include/linux/soc/nxp/lpc32xx-misc.h b/include/linux/soc/nxp/lpc32xx-misc.h new file mode 100644 index 000000000000..f232e1a1bcdc --- /dev/null +++ b/include/linux/soc/nxp/lpc32xx-misc.h @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Author: Kevin Wells + * + * Copyright (C) 2010 NXP Semiconductors + */ + +#ifndef __SOC_LPC32XX_MISC_H +#define __SOC_LPC32XX_MISC_H + +#include + +#ifdef CONFIG_ARCH_LPC32XX +extern u32 lpc32xx_return_iram(void __iomem **mapbase, dma_addr_t *dmaaddr); +#else +static inline u32 lpc32xx_return_iram(void __iomem **mapbase, dma_addr_t *dmaaddr) +{ + *mapbase = NULL; + *dmaaddr = 0; + return 0; +} +#endif + +#endif /* __SOC_LPC32XX_MISC_H */ From patchwork Fri Aug 9 14:40:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 170939 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp10103537ile; Fri, 9 Aug 2019 07:44:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqyDiVSqL0+yGfY9AsJBkrhNjKdQpBtgyA82W5fowYQ7JPaqGvkXlim94Fy3Vv7oMft2HBTs X-Received: by 2002:a17:902:40e:: with SMTP id 14mr9233229ple.323.1565361852386; Fri, 09 Aug 2019 07:44:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565361852; cv=none; d=google.com; s=arc-20160816; b=JuOkNmfQHoKfVZL0n/4OfLM0F+P7ooJNJrxt4ugV7GknrkSi8qzk4lPbQGNz2x7Vbt PJdPETG0nCkEd5IGs+zqqbx3QBGdGJbBE+YmFh0W9g6G1PZ9nvi0xdFWwQDmfsVK8qVA +530uewKZ7/Vn/bMQ0voIWjK5jaHsCJ4vmk/x9UNRtivbO1B8md9EiJTTX5UjXChFh+C OvrKTxn5WSojl66m5COdL41FHbV0eJbCrRBX+pWRy3jusxhFJM8njLjAjGx7QwzOxRa9 DuVId+1OEg+HUuC5yaCItBOm2WV0fqQz8Ot6ZiPxlUANa/dycJzlnvTXnzvTAOLjNmbq uziA== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=v2uhnx/kTHKRUG/12O0Lgcv/K2K6wy1QRYdE54NdAm4=; b=En4X3M7bJHBHXHQ41/vr1swiO//Ery3lbmXz0POycI3V3C+vRsAk1xNlPwhS/77mt0 MgXmhET2wr9RfAvaqdCz5TiB+p0LnAiqsjUJw0Zs9AlHb4goPXWt5PyuYTMnG6oO4+Uf FoPmrrsj5sb5KvxaGzPleZpqk5oMMhzWRj9nxzaRnZDf8uTzCHyNHBuPFhX/ebw403Us rnrSkvAPERYz/Ie4NK1u8oql2lOYC2o5QFEAXHPppC33bFlKgkBHAo2frZbXb5ZP6xDb tii6TW8T7u24kY6WqfxEIh5hS3aBneA7f17WtqDUW8yjjbFVuR/JYMF4buoa3PRo0hJo yVyw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v19si53517803pff.229.2019.08.09.07.44.12; Fri, 09 Aug 2019 07:44:12 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407131AbfHIOoL (ORCPT + 28 others); Fri, 9 Aug 2019 10:44:11 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:55503 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407102AbfHIOoK (ORCPT ); Fri, 9 Aug 2019 10:44:10 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPA (Nemesis) id 1Mx0VH-1iG7wk0ZcR-00yNx6; Fri, 09 Aug 2019 16:43:57 +0200 From: Arnd Bergmann To: soc@kernel.org Cc: Vladimir Zapolskiy , Sylvain Lemieux , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann , "David S. Miller" , netdev@vger.kernel.org Subject: [PATCH v2 07/13] net: lpc-enet: move phy setup into platform code Date: Fri, 9 Aug 2019 16:40:33 +0200 Message-Id: <20190809144043.476786-8-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190809144043.476786-1-arnd@arndb.de> References: <20190809144043.476786-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:npK/7O3KZV7d5O6NlWG3KNX1AMZFTWjJt5jIZxT/9Cn6I6FKIyo QtmoB26+nkmPETIXDitdSAt3MnVUpAxDnh/1ZLz+8c0KEwvBbqHnSWWDkLtfc/YRekmRqr5 U4rxDZ6QBOwqpsUrp+++R8K7fAN9D0TeE8kfbsHlLe8H0PeB8CZjVjOVT8MXhEld2he1dd2 UkoVJI9R12KVyqTHBifnQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:kLcmpZsLMHg=:LoRu5U8RBYNWBdajrx2Cwj 6uByw9wEYucEAL3bs+1NpQky5IJXsvTOh30GBcLVsNnj5/OwquXE9MpMPWojycLdCkndhwz+z puWsll5zQwgM8JWIVSvq6AWJAbVRm2X4pe5oDaKtxCngVuIIA+axfdXJ0S6FbTUnb8VnSwRIz qq7v+7v038KEMCGZ35mPmHCkXfEU1cSN6ZYwbZ0efnPULIZduEpJC52N64jDVt8VisVK3ssV7 6aZtKKRmULV1uAZhzrlmFP9iq2m/I9znqHOwo0YJr7yMOEeIgUZbJKtSxQV4j+UbcZDmS8HQE LuGQwq1CMlbsrrJJ0CGqN2/mLKJxYmnbfJtnsDdp1pjp20yYDa4qMU8r6bhtgwS3/yG7zDNqK iZxDQHnl4i8x6PnGJz67MzpBbv3vmsym27A3S58cKKn6Md9UDbBI242zZ6rbizo5HJDKXJ6GI UxCWGLvITRVhAspCZCfwt+EBfFguy1dhrC9XrOF4I0VJK3M53cHCw+jPJUdCzLP0oyIMvdtkp Weh4d1hylUIKcVZqernWkqPkZorxBi3+lgfwM6I+ifN2erPkpucf3aFo3oP3Wfr9zIDsiHgRm mo7Zowpf0ldICtz3wHHRygz4UhGCgI7NWy93AvCjci6ORuvc4Ev3IYioUWqjuGJPDuxULpn4A a15PpF5qK7LDO+UcnTtvdG5ORUZbfltTMWziW0OG2VhmkxTExAwXFxEmM7eWriJ1BYH607csq 1aGj26CaWSLC6rzP2Cbj9tPr6g43e+aGnQqJxQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Setting the phy mode requires touching a platform specific register, which prevents us from building the driver without its header files. Move it into a separate function in arch/arm/mach/lpc32xx to hide the core registers from the network driver. Acked-by: Sylvain Lemieux Signed-off-by: Arnd Bergmann --- arch/arm/mach-lpc32xx/common.c | 12 ++++++++++++ drivers/net/ethernet/nxp/lpc_eth.c | 12 +----------- include/linux/soc/nxp/lpc32xx-misc.h | 5 +++++ 3 files changed, 18 insertions(+), 11 deletions(-) -- 2.20.0 diff --git a/arch/arm/mach-lpc32xx/common.c b/arch/arm/mach-lpc32xx/common.c index f648324d5fb4..a475339333c1 100644 --- a/arch/arm/mach-lpc32xx/common.c +++ b/arch/arm/mach-lpc32xx/common.c @@ -63,6 +63,18 @@ u32 lpc32xx_return_iram(void __iomem **mapbase, dma_addr_t *dmaaddr) } EXPORT_SYMBOL_GPL(lpc32xx_return_iram); +void lpc32xx_set_phy_interface_mode(phy_interface_t mode) +{ + u32 tmp = __raw_readl(LPC32XX_CLKPWR_MACCLK_CTRL); + tmp &= ~LPC32XX_CLKPWR_MACCTRL_PINS_MSK; + if (mode == PHY_INTERFACE_MODE_MII) + tmp |= LPC32XX_CLKPWR_MACCTRL_USE_MII_PINS; + else + tmp |= LPC32XX_CLKPWR_MACCTRL_USE_RMII_PINS; + __raw_writel(tmp, LPC32XX_CLKPWR_MACCLK_CTRL); +} +EXPORT_SYMBOL_GPL(lpc32xx_set_phy_interface_mode); + static struct map_desc lpc32xx_io_desc[] __initdata = { { .virtual = (unsigned long)IO_ADDRESS(LPC32XX_AHB0_START), diff --git a/drivers/net/ethernet/nxp/lpc_eth.c b/drivers/net/ethernet/nxp/lpc_eth.c index bcdd0adcfb0c..0893b77c385d 100644 --- a/drivers/net/ethernet/nxp/lpc_eth.c +++ b/drivers/net/ethernet/nxp/lpc_eth.c @@ -20,9 +20,6 @@ #include #include -#include -#include - #define MODNAME "lpc-eth" #define DRV_VERSION "1.00" @@ -1237,16 +1234,9 @@ static int lpc_eth_drv_probe(struct platform_device *pdev) dma_addr_t dma_handle; struct resource *res; int irq, ret; - u32 tmp; /* Setup network interface for RMII or MII mode */ - tmp = __raw_readl(LPC32XX_CLKPWR_MACCLK_CTRL); - tmp &= ~LPC32XX_CLKPWR_MACCTRL_PINS_MSK; - if (lpc_phy_interface_mode(dev) == PHY_INTERFACE_MODE_MII) - tmp |= LPC32XX_CLKPWR_MACCTRL_USE_MII_PINS; - else - tmp |= LPC32XX_CLKPWR_MACCTRL_USE_RMII_PINS; - __raw_writel(tmp, LPC32XX_CLKPWR_MACCLK_CTRL); + lpc32xx_set_phy_interface_mode(lpc_phy_interface_mode(dev)); /* Get platform resources */ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); diff --git a/include/linux/soc/nxp/lpc32xx-misc.h b/include/linux/soc/nxp/lpc32xx-misc.h index f232e1a1bcdc..af4f82f6cf3b 100644 --- a/include/linux/soc/nxp/lpc32xx-misc.h +++ b/include/linux/soc/nxp/lpc32xx-misc.h @@ -9,9 +9,11 @@ #define __SOC_LPC32XX_MISC_H #include +#include #ifdef CONFIG_ARCH_LPC32XX extern u32 lpc32xx_return_iram(void __iomem **mapbase, dma_addr_t *dmaaddr); +extern void lpc32xx_set_phy_interface_mode(phy_interface_t mode); #else static inline u32 lpc32xx_return_iram(void __iomem **mapbase, dma_addr_t *dmaaddr) { @@ -19,6 +21,9 @@ static inline u32 lpc32xx_return_iram(void __iomem **mapbase, dma_addr_t *dmaadd *dmaaddr = 0; return 0; } +static inline void lpc32xx_set_phy_interface_mode(phy_interface_t mode) +{ +} #endif #endif /* __SOC_LPC32XX_MISC_H */ From patchwork Fri Aug 9 14:40:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 170940 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp10103955ile; Fri, 9 Aug 2019 07:44:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqzt4OGzsdpJQuA0sGc+Q4BaK9rE9DsW+nmhyoXbv/vQKTnKxTzVLl7+8FQTKiMKr0j2LKip X-Received: by 2002:a63:506:: with SMTP id 6mr17655231pgf.434.1565361874288; Fri, 09 Aug 2019 07:44:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565361874; cv=none; d=google.com; s=arc-20160816; b=Gb8kIpd59dqEMKz59jP/1C3uZ+78+oz9FYDOPafZta+rwBJR7D4J0f/n7RUt2yV1Wi jP4LKtmvgoiERCwlxyhyzXgLyAFaZwExfG74PCIjhh877c9YxN63c8DnJwM/+4+BoHj9 ws9yn/PRYX6ETY/adipmFc8ldrEUg2+YKKQfwYFpHGvWjzKWbRYub1+IqAw0CvcerfZz /w0/sG+i1uLuglg68SVh65Dw6w060/L/M0kGWkW3CUx9fIhGFvDqW8Uo28U6kA9yRztU kO3ZNqh9Lt0nWk1TwmeUcO/HFLG2eVUU4MA8rOfKQDqeyV5tghcQmqmQYMARQ9jjUFgM qH/Q== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=TYyx0FUA/ofsYfk9SQzB36989rINHG8jTpTEvzlWzsk=; b=Q7oLWs5DMW/gi/f51r4x0/Qh43cNEte0FCq+OdOUvNbZPGW+ANM2VRTqEoeq4wBb/7 kV8AgKaseGGFjXDSyusGdS50OGK9AYTMMNqz7mVf4oI6sTqdacZzAt5sJqmBF/ilkjuT 1TBLJtK/1Jf9FJhcQwlDDBv6VltCywRZmRidHDkLnXD48nNNZId5pHVoLNueexxVmWO0 TOdRtdZC3d4dHO0wN/bNXVA818UZGPRhHluCYzXBicmG/IlJgatbGarwOV8++D5JPlGf +9spQANjHRktovzdqUeLCEbvGm5OSblh/D3W+USsM2X3tkuFOrVNw8pJ/SjN7Tt8PObn auWQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r3si49572445plb.14.2019.08.09.07.44.33; Fri, 09 Aug 2019 07:44:34 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407161AbfHIOod (ORCPT + 28 others); Fri, 9 Aug 2019 10:44:33 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:54831 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726157AbfHIOob (ORCPT ); Fri, 9 Aug 2019 10:44:31 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPA (Nemesis) id 1MeDYt-1iUKLc3gKV-00bKl6; Fri, 09 Aug 2019 16:44:12 +0200 From: Arnd Bergmann To: soc@kernel.org Cc: Vladimir Zapolskiy , Sylvain Lemieux , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kbuild test robot , Arnd Bergmann , "David S. Miller" , netdev@vger.kernel.org Subject: [PATCH v2 08/13] net: lpc-enet: fix badzero.cocci warnings Date: Fri, 9 Aug 2019 16:40:34 +0200 Message-Id: <20190809144043.476786-9-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190809144043.476786-1-arnd@arndb.de> References: <20190809144043.476786-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:ymJswPYKYUfJcYhkgzxASapbRky55SNMKmN45E1N1FA/lD9wVRt nEkanG7MtJ/Pqveg+h6/6LAG+DrFlq4SuhWOfaZiZETH7gs4em9A42H4Zt4uT3VfWrhsRIe CulwVh+XfSAkba94KTZX+nwNfSPRHjC2+ey++8db5AJWpxOhnI+dyS0vb26UIXRYODolgss ynV1gvQMpkNJsma+aWNww== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:DJdco6j8rD4=:dQhHBR77IFlKfKZRM8eVPy V4nC2W/CrV/kLoRpyM40abNGXn7N9t/aH3K6fSYmFvDJr7DP0iiwcuYczFi4+CUVeoUIdbnMI arj1+4IXw5yJCeQTYabD611KpdLgrW7/n+Sc3ySzEvRoON9NljdOTWLx1riZgBH8a+wiRXA+L Eq7ZMP3kqlqu1mdz6XZUdwfunBrF7kR81tnf374XRy0wcH9UI9pI1LPhQu4CxyQlr85VMyZbg MhS/+C5PMG7Lyc9niJLsIzIHqazyAa9QgashCgryO59fbkX7/lpkbilsIGUSCuQ/IzaJcH6cV Q0dtBElm1MOZYc7+F4ZRBk/XAnZH40dzJpa3NYDI+N4O/wKzd1jnNyobsVqrxesXszSXszE9a CU6nIAwn9meG1N+GkMf+kB32G+m2gqCI7O0myYNCfDswYe0kxTEI6pCxJIZHoavUtj7pPfAt/ 3ZlaoDE6Od+cEXOij5a2FrcdIj94CHIauGWDuM/3zIsqw7SBVPobAgPkN7iGhLnSCQVB1GvMU 5wUJ8aM5BAQMSMG8/TVMdRjFtlbnsBbq1cVqM5oSyJVzfFfum40hbwvFTL4i2BqXgJBWgzk8E gAvKXfQuhMQL0z7O1bJJyFvZ1oZ8MoFzb8fhiwTteLjiO2a+OB0LVNxbmJTw++1xInAJgDDgO 0G/+Jii877WgDnTQ4DecrPqaIx+F4QDoF2YK8KG7GHUHKoeZqLRr5CHs2p7m1l9QYrih/gVOv BKbi3SN3knrMlI+s1+mASE3vWQVTBTatnNgMew== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: kbuild test robot drivers/net/ethernet/nxp/lpc_eth.c:1316:31-32: WARNING comparing pointer to 0 Compare pointer-typed values to NULL rather than 0 Semantic patch information: This makes an effort to choose between !x and x == NULL. !x is used if it has previously been used with the function used to initialize x. This relies on type information. More type information can be obtained using the option -all_includes and the option -I to specify an include path. Generated by: scripts/coccinelle/null/badzero.cocci Fixes: e42016eb3844 ("net: lpc-enet: allow compile testing") Signed-off-by: kbuild test robot Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/nxp/lpc_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.0 diff --git a/drivers/net/ethernet/nxp/lpc_eth.c b/drivers/net/ethernet/nxp/lpc_eth.c index 0893b77c385d..797bdbbcef76 100644 --- a/drivers/net/ethernet/nxp/lpc_eth.c +++ b/drivers/net/ethernet/nxp/lpc_eth.c @@ -1312,7 +1312,7 @@ static int lpc_eth_drv_probe(struct platform_device *pdev) } } - if (pldat->dma_buff_base_v == 0) { + if (pldat->dma_buff_base_v == NULL) { ret = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(32)); if (ret) goto err_out_free_irq; From patchwork Fri Aug 9 14:40:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 170941 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp10104134ile; Fri, 9 Aug 2019 07:44:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqyic5kXGV8WEC1MG0ocwzBay1lbVwqbdejSFY3aB5Ydn2DgYbpRmHnbibnimflPqJTEyw6G X-Received: by 2002:a63:db47:: with SMTP id x7mr17807247pgi.375.1565361883588; Fri, 09 Aug 2019 07:44:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565361883; cv=none; d=google.com; s=arc-20160816; b=UVgGwRnUaP8R/UcGXhlmWHx0kGdPQEG7ChnZD89CQsTBnfb9zUnfikw5gFsQGN6b9D 8z2IEdz7DJTf4FqpjhS7kNrshoAdPF29koEdulCW/8W1ezXXREchQqcbtLu7SYmZ3bB1 SueUzSBB4NU68b/bRalyKIK3r6RtvBrb/TvIv8t5aAcwJrVtDlZBvVrqhIOwN2wjsbH7 IxzeFVcZeMAZnYheKFoHJwlo+uhlgp8uPS9CTfXFrZ5RRL0TPXZU5CebRwpLEpUfDWNh UZzE84IYlFP6y3bNV+B9yIHrlrY1i87zUR8ggT8xwCLkkAOi5yATMZfDL0kdB4+mnTbx u9RQ== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=+XyS78J9Lc+Nr9DY7XJb5v5FxUEcGatLg9ldXXGspUQ=; b=sugC8CW3pBUZ0owmIAjvqnRJMc6GKHRDD3OzibqhLVF/otJb6SE33gvvkDJLXvMSiF 7zoto/+X9nA4A1exgx8Y27Ifm/L6R1v7uL4JAybJszEfJe6uRZSRmC2cuXrTIxXIzPXC dET3in334F2Tu3v4vzil7i2MaS/4TmoDnYnmOueNWPp3+r2U7f9xB7UD0eTGBj1SeOoN CQTp1Ve1LMf2Nq7Hasdx80PBSTCM5kUJjHoFcw+2gBymd500zm9CGV9u7iJJbsPK5AF/ zmW/eONgr9GprloGt0vP+AcFuF0DvDfIuxJtBY96T4fHA41tN67vwde32eP/fu5BbiKz EpXQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r3si49572445plb.14.2019.08.09.07.44.43; Fri, 09 Aug 2019 07:44:43 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407178AbfHIOom (ORCPT + 28 others); Fri, 9 Aug 2019 10:44:42 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:33633 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726157AbfHIOol (ORCPT ); Fri, 9 Aug 2019 10:44:41 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPA (Nemesis) id 1Mth79-1iAbbg0rWx-00v4ZM; Fri, 09 Aug 2019 16:44:27 +0200 From: Arnd Bergmann To: soc@kernel.org Cc: Vladimir Zapolskiy , Sylvain Lemieux , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann , kbuild test robot , "David S. Miller" , netdev@vger.kernel.org Subject: [PATCH v2 09/13] net: lpc-enet: fix printk format strings Date: Fri, 9 Aug 2019 16:40:35 +0200 Message-Id: <20190809144043.476786-10-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190809144043.476786-1-arnd@arndb.de> References: <20190809144043.476786-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:6Fx2odY0ygf+ZHM70dyaWh2GH0CHTs6YpTvBzkGXRPduV6BL0xl t72e5WbYRZFfSyvNB5wHUAwHLeZrRfgO4HsFF1kwFOkXWXfEfef0oUUQmo9a7s+ITnC2TC+ 83aglvlCCZmL5CEyNOodIIoVqFkema1G7urRVaVoGoYERLaBffBuydHZlG05der7HKlg+8P OTW/9RUwYKzKBmDHb7gtQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:IvXMTkvFbS0=:zCF+fdgg8gxSjM2KXJSPbJ VtwjpBPJBmUSNRZymPnwHy8UAVEH3AY87/wx7kAmDEo7Ulj2EaWiGC+0HiQ+ndiYtZKiyTLxl JAXVJ86moHoU7dHh7NqiGOJ2Y4Hr0CJHSWHTSLtnvX+b+hOeE+I/11Yi4s77Awb0yLy6lryhB tlDFKkKYJw8B19AA8zNr2iy0oVlqeNbck1fB/uiFuBrEiGvBRWOoPAt3pCDicmfFHv8EBM8vw 2XMGotVZeXkuUwizIf9EXHPFDdz4VAl8pn3M5/mWc78z0ybKFzqIgthgmFglQat1OsHelO1QD rXrQhGs5SUXc+uStB+paJsNTPN77kxpbjTV+w1O1yCYC3Amyvmv/bSZmAf1YEOd6KlfBjpDD3 VzNB1aQlAkF1mrKyvzy7ZRgkv9JmAZQ5xz2VRkNSu6mL0bMduELxlE+SIo4n1PkN0U/qfxVWP bzpXA/qiauT/MF13bZEN91IdcPpgpWVjz1G+9dq74SI3PLbTa+dWwGXXqwid4XAHRYbMqVDQi lvGIftyfNw8cJGgSEAyUBkbjfbnav+dp0GVwlM9+1ALdO7BkzPgrWKYSwT6SlUk1jraB2KY2W S9Q4BHZnG38FT0fpiQZsHq8FDrRVjQwz3OVmvGgF0MdVfh0VJyDOAHaG24pv5LIz/3i9bvb2l sj1C+PreIxrQ7mIjxDi988Xvgo8p3tN2V5ylpjAX/3tK8g2/6yAwypL2liN89WbYLGX0HT2tp GnBSi/LdGRTsDTOWzvgCZ0kpO6+9F4WT0WoDNg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org compile-testing this driver on other architectures showed multiple warnings: drivers/net/ethernet/nxp/lpc_eth.c: In function 'lpc_eth_drv_probe': drivers/net/ethernet/nxp/lpc_eth.c:1337:19: warning: format '%d' expects argument of type 'int', but argument 4 has type 'resource_size_t {aka long long unsigned int}' [-Wformat=] drivers/net/ethernet/nxp/lpc_eth.c:1342:19: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'dma_addr_t {aka long long unsigned int}' [-Wformat=] Use format strings that work on all architectures. Reported-by: kbuild test robot Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/nxp/lpc_eth.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) -- 2.20.0 diff --git a/drivers/net/ethernet/nxp/lpc_eth.c b/drivers/net/ethernet/nxp/lpc_eth.c index 797bdbbcef76..96d509c418bf 100644 --- a/drivers/net/ethernet/nxp/lpc_eth.c +++ b/drivers/net/ethernet/nxp/lpc_eth.c @@ -1333,13 +1333,14 @@ static int lpc_eth_drv_probe(struct platform_device *pdev) pldat->dma_buff_base_p = dma_handle; netdev_dbg(ndev, "IO address space :%pR\n", res); - netdev_dbg(ndev, "IO address size :%d\n", resource_size(res)); + netdev_dbg(ndev, "IO address size :%zd\n", + (size_t)resource_size(res)); netdev_dbg(ndev, "IO address (mapped) :0x%p\n", pldat->net_base); netdev_dbg(ndev, "IRQ number :%d\n", ndev->irq); - netdev_dbg(ndev, "DMA buffer size :%d\n", pldat->dma_buff_size); - netdev_dbg(ndev, "DMA buffer P address :0x%08x\n", - pldat->dma_buff_base_p); + netdev_dbg(ndev, "DMA buffer size :%zd\n", pldat->dma_buff_size); + netdev_dbg(ndev, "DMA buffer P address :%pad\n", + &pldat->dma_buff_base_p); netdev_dbg(ndev, "DMA buffer V address :0x%p\n", pldat->dma_buff_base_v); @@ -1386,8 +1387,8 @@ static int lpc_eth_drv_probe(struct platform_device *pdev) if (ret) goto err_out_unregister_netdev; - netdev_info(ndev, "LPC mac at 0x%08x irq %d\n", - res->start, ndev->irq); + netdev_info(ndev, "LPC mac at 0x%08lx irq %d\n", + (unsigned long)res->start, ndev->irq); device_init_wakeup(dev, 1); device_set_wakeup_enable(dev, 0); From patchwork Fri Aug 9 14:40:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 170942 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp10104454ile; Fri, 9 Aug 2019 07:44:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqxPKyGs1V8tptq3RfdHDEg4W182GoL2v0yvPmFeVbNIn1XoyUZoFQIbuneRF9XSBLs5uJPf X-Received: by 2002:a17:90a:fa07:: with SMTP id cm7mr9497148pjb.138.1565361899563; Fri, 09 Aug 2019 07:44:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565361899; cv=none; d=google.com; s=arc-20160816; b=Ah1QJbWqLiWgYwWzN6jNSkicAzShE6yCR+S3oc0xHbCOzpF5nCQIkKayeaIvYCv5Pr LTfz2JPcniJ7gain2+VakTk9xus3/+XVNY+aq4JnT2S/hPv+dkfZbQDEZTD29htrA5r8 b0ofS+8cp5MEyoOH3nLkP/2fEtFvpHuhRBd7eOl0bU79JPUP/59cg55jEPFL+LEhlFPy gkAEzGhVbbAsg/PAWusiYUNPDoiGBRg3nqMgZzKlT8Lt+6HG58x8EIiFC85FugeV/vrP TAtFO6e8rF1d0ilVCdyHvB/OV/4FGCTL7cdyL2xqFz4APdPMftRfFPROdDuZta4cDbkG vYkg== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=UDXEAYZ3O4wTwr/mlyfcXBIHGMA91FT0WdknIVt1vYw=; b=UmRnoPlf/EGEqKJDWsWn/Ync3SyTHFnwyP+RYBoLzxxFRLHVU+6bCH1mcTlw3DCMUL nKZ7fQvsyQGOcgIGotiwaQtr/bglCww4tm2SYus8zpFUuxgXOMdSLnv5ZHYU5mctf2+Z 9lWzGwrrQI9P649vl65JJd3AAH4QRm1N2aS7KJ+QseHh7zfUYPIq/nRxNb1+VuSzOqtb XwlVvsrSg60zIwxAlNEEvjflNrILBDmh7GmIBGcRGt2Au6GcNir0fjrK5YQEkQ6fBbtY g98BlqiPXBY7RhuWi36tsoBpEJLRsHg4lRXsAJlHXiavch2yUA/Grni/sXGH2tl40zBI n20g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f17si58582730pgh.552.2019.08.09.07.44.59; Fri, 09 Aug 2019 07:44:59 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407186AbfHIOo6 (ORCPT + 28 others); Fri, 9 Aug 2019 10:44:58 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:53237 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726157AbfHIOo5 (ORCPT ); Fri, 9 Aug 2019 10:44:57 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPA (Nemesis) id 1M7ehh-1hwwfj3ddd-0084kM; Fri, 09 Aug 2019 16:44:47 +0200 From: Arnd Bergmann To: soc@kernel.org Cc: Vladimir Zapolskiy , Sylvain Lemieux , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann , "David S. Miller" , netdev@vger.kernel.org Subject: [PATCH v2 10/13] net: lpc-enet: allow compile testing Date: Fri, 9 Aug 2019 16:40:36 +0200 Message-Id: <20190809144043.476786-11-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190809144043.476786-1-arnd@arndb.de> References: <20190809144043.476786-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:RCFvjeuu0t6f1S3c2jeBwyAit2sEKCe3winoluK8TV6k5NAoOUO 0HaU0UeVh1bfmegCwZ/LxZYBGuVQ+7eXPexo60SZ4/fhiQPq4crzC1qGmIJ/ZR2C10ryy8P +3n+Rbdz54ykoqC2GhA3rvwxeJ73S0gOOpx9LpPn+IDp8M7Qct4l2VjHj5K1QVYXDT4/g+1 gvS4O0eBreeQVVrF4XDYQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:vO1wbEWxD8I=:6+u3R4GfutAihcMR0mmONZ HP7bzqimvfTuINSG21LTieDz2KUv6efnOlbOGeMn/i80QZwho0TC8mAEWfJXPHxbAKDG5Suh4 RknDI+FhEgZXDXw+DJvO73m1TbsaSWq2ADaOzaNwMKz7Yz4pLjKnkyjMsAXyqXqCKvpsnzanG DgCK/RBBm1OyJ4pOqRVtrly4GqCbLNtqtqww+vCW+wF2UVLD8sfjRbflblvU3XjSkdb8lxMjW Od8LUDWA4Q/S4zjmOaM8r+7U6V1V9EUUhMU8ZmL7yMbEansGeMyI01jfvMSd/YY4eJ7Z5j9Mi 4uew4FuY2ITGLxTVi3UPQQVs+qsi8o/GhBVluXyBAkVbRigHeUHG8DvCn2LGcPkWDbBBtAs++ cnGw/LGJ1ElnskF8l3d/+52MiyvPTv7yNgPEPXW0G+JcTKe+NE3ZVT/64VkZrjVXr4w57wx5h v005eDqI5QkSiqRdjwzeJxgfoXeUsRsJrZtQtZyQOphMoQeJKZsR9dHCZBwq/ocx8x8bC7iGf BMS2ffpA+JkheWx0C7rTmkMzyAnIFPMYV/Po522SNNBCx4MlExhIzMw5aWwG5vujNXpeXtrSD 0WeGsWIjjNnImHwadAS1ScB4KbQd0Xcv7VSH83TABwqk/9+M0AiscaQ6OL6rauWRhnvvucmdq hJ4xCU1b0ilijKOsiP6+DOn9UJH6iQOSwn5qWI79J+uZC16GTA08mzqfWm9BYDLFzck/qhkE9 5iCn+1XwlD62XtNtWSIAMC5X1XYrH4ZPc/M73w== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The lpc-enet driver can now be built on all platforms, so allow compile testing as well. Add one missing header inclusion that is required in some configurations. Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/nxp/Kconfig | 2 +- drivers/net/ethernet/nxp/lpc_eth.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) -- 2.20.0 diff --git a/drivers/net/ethernet/nxp/Kconfig b/drivers/net/ethernet/nxp/Kconfig index 261f107e2be0..418afb84c84b 100644 --- a/drivers/net/ethernet/nxp/Kconfig +++ b/drivers/net/ethernet/nxp/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config LPC_ENET tristate "NXP ethernet MAC on LPC devices" - depends on ARCH_LPC32XX + depends on ARCH_LPC32XX || COMPILE_TEST select PHYLIB help Say Y or M here if you want to use the NXP ethernet MAC included on diff --git a/drivers/net/ethernet/nxp/lpc_eth.c b/drivers/net/ethernet/nxp/lpc_eth.c index 96d509c418bf..141571e2ec11 100644 --- a/drivers/net/ethernet/nxp/lpc_eth.c +++ b/drivers/net/ethernet/nxp/lpc_eth.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include From patchwork Fri Aug 9 14:40:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 170944 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp10106089ile; Fri, 9 Aug 2019 07:46:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqzrcvbZ78YsWzL3KXm5nYDuelk7Q0V9Mes+1pr8dKLNWgOCmqROF8iFfiAxU9xc3c7yDYWx X-Received: by 2002:a17:90a:80c4:: with SMTP id k4mr9963354pjw.74.1565361975891; Fri, 09 Aug 2019 07:46:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565361975; cv=none; d=google.com; s=arc-20160816; b=ZkKP8ZY+T+NurAfhTVjbmXvnfqlrmGn+fTzHO+WYQveZ/Rl2EToilHlKOo7+rxqpY6 opxpcnK+0i+6gYay+U4n3W7IQTo/aqT3a7E3S3NRoBZgWMUr9NOHVnksZZSp8XKxPPL6 WpQLFtgtOQqRY3kzyjmvA9DKqAoiF2hQpkRbofm5xQCODxQJSARNYcHZwo2hz6Xr1wdy AEuNHMWwdx/uRRcFFbjNRoh1Y8Cye2GSQNKUF4JYmKajStBlhsoSOC/RzENW/biOMiUp RydX2ySZOhCHj0e8JySFlYLJicA5fVsqYGYmvaHANJ1JLX5/uRlg1yS58Qj+hEyWQUbW zJBQ== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=SR9k1a5iA96d1T+lgO/ZWxdetLDLKpfTNKCVnYxDsUk=; b=nDC/eDUylXvSgYzxyy8R5NsDcxNWNvpwYxZj77oAoJYAKpRmojBdD2Ea0HP5NS6rI7 d05uFwQDumEf/65jyyDma5TQ/+bCQGL3r1rr2aAtm9ZZBkXATQLMu5AZHJgo84AWOXVf PamjV7jKIGzrSEE+BHdFeQkrVWtdtyAIvcCFR3V1l+uDBkQ/RGH9wK/zq0P0mpgSs5l8 ADW1m00kRwspi05/BBpsTTyUM179OXHeTV9tihpbLrCYI+IHcJwJxU2Ug7f0mj6w3CjI m+NElJsRuoPjGcrjAQnG1EdXgHcRR36IKZpGsizY5YF2bhqrCi/XLQ9zN0RaBN8pokd2 eq9g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l35si50492557plb.186.2019.08.09.07.46.15; Fri, 09 Aug 2019 07:46:15 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407226AbfHIOqO (ORCPT + 28 others); Fri, 9 Aug 2019 10:46:14 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:40925 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406127AbfHIOqO (ORCPT ); Fri, 9 Aug 2019 10:46:14 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPA (Nemesis) id 1MpTpc-1if78t25mO-00py9b; Fri, 09 Aug 2019 16:45:59 +0200 From: Arnd Bergmann To: soc@kernel.org, Vladimir Zapolskiy , Sylvain Lemieux Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH v2 12/13] ARM: lpc32xx: clean up header files Date: Fri, 9 Aug 2019 16:40:38 +0200 Message-Id: <20190809144043.476786-13-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190809144043.476786-1-arnd@arndb.de> References: <20190809144043.476786-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:gUv5Djd/kUqZty7AwE14hMF4BlO136N+kfe2FDOX9t6V9ZTl3xJ RyDl101DmZmiqt6fWRNui6ntR+M8v6PNq36iqqfyAIEP4TNYQgNva6vtZMNBiqQ5whyMYJl uME5uFSbE50zOjXnMdLR0vuRF67iM6tFcgPcX4lSproSYFO+rw88afqDIy4juJQlXKUZE0t wesLQIQyeBR+lrUPQBxYg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:4LZhuL+dm+4=:3OE/ZUQHPHOVTVdznznZXx F2OyfC2OjeZoVmm9lNylI73g6dCm780+Ipwl1Jdi2DPqBHoI8GoIw+bBlr2VltLNH6i0vr1q8 rIF/ySmGXW7tZMB0VllI3+/4vxM8OUyrN6FY6GJ6s+D2Vc8ebnqqAVSRkz6wr0fw7Tw1e6/iV 44ggRUunEJPwvBl7QtfDFC/qMfm0HGOVMYVKS54R4WSUElA+rnXSN1KKFzrT4NSDePDoKCZtS BvCspyedjyK/lMqDDQ9lCcokNNtEJ/pG0dzskxpw/QgrWoQBYsKP8j9FE/oqseoUDJW8t5u7a weT9b0bBW8olKPCKmcqPk5g1u7lvm8WvJqNfegItKNeunq1T6YMzyh3xy5FH0psNAOaKeOkDV zs5wlKCRUSyJtZk3qc+hRSebTZtQXIFXZXywAYiXFoav/E2JBbefh/yDJwBHwGYt0Sj7LNT4m WtWKrDFA4qwAwtjbLZQwCRiATSD95DmAIkB4wwwwZXGAijS9uW3rHvry1L//1C7l9JTIdbAfj 149HFxwj+/+v5cn805YbC9cXL8BL2skeJz4ITkeL0cC+b7tIc3S6LB/lhkoBAaWnuWMmYnMiE QzTXlj+kILJ3jL6TzzPDHVjeV8H4Oxfh4Xm5NS7DmNIRjI7URFYufNbf9yi6WkSEH47AEDN0H s/W7fKBWJQl9WozDUmfJSOo5bIGRbo99oghLJCpkag3UMvXddho/VUu7TRFKEjcvc3TXuQ5SU IVVDb8PCe6GE4A6py4qZkRfx3pWAjSE1AADxWg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org All device drivers have stopped relying on mach/*.h headers, so move the remaining headers into arch/arm/mach-lpc32xx/lpc32xx.h to prepare for multiplatform builds. The mach/entry-macro.S file has been unused for a long time now and can simply get removed. Acked-by: Sylvain Lemieux Signed-off-by: Arnd Bergmann --- arch/arm/mach-lpc32xx/common.c | 3 +- .../mach-lpc32xx/include/mach/entry-macro.S | 28 ------------------- arch/arm/mach-lpc32xx/include/mach/hardware.h | 25 ----------------- .../mach-lpc32xx/include/mach/uncompress.h | 4 +-- .../{include/mach/platform.h => lpc32xx.h} | 18 ++++++++++-- arch/arm/mach-lpc32xx/pm.c | 3 +- arch/arm/mach-lpc32xx/serial.c | 3 +- arch/arm/mach-lpc32xx/suspend.S | 3 +- 8 files changed, 21 insertions(+), 66 deletions(-) delete mode 100644 arch/arm/mach-lpc32xx/include/mach/entry-macro.S delete mode 100644 arch/arm/mach-lpc32xx/include/mach/hardware.h rename arch/arm/mach-lpc32xx/{include/mach/platform.h => lpc32xx.h} (98%) -- 2.20.0 diff --git a/arch/arm/mach-lpc32xx/common.c b/arch/arm/mach-lpc32xx/common.c index a475339333c1..304ea61a0716 100644 --- a/arch/arm/mach-lpc32xx/common.c +++ b/arch/arm/mach-lpc32xx/common.c @@ -13,8 +13,7 @@ #include #include -#include -#include +#include "lpc32xx.h" #include "common.h" /* diff --git a/arch/arm/mach-lpc32xx/include/mach/entry-macro.S b/arch/arm/mach-lpc32xx/include/mach/entry-macro.S deleted file mode 100644 index eec0f5f7e722..000000000000 --- a/arch/arm/mach-lpc32xx/include/mach/entry-macro.S +++ /dev/null @@ -1,28 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ -/* - * arch/arm/mach-lpc32xx/include/mach/entry-macro.S - * - * Author: Kevin Wells - * - * Copyright (C) 2010 NXP Semiconductors - */ - -#include -#include - -#define LPC32XX_INTC_MASKED_STATUS_OFS 0x8 - - .macro get_irqnr_preamble, base, tmp - ldr \base, =IO_ADDRESS(LPC32XX_MIC_BASE) - .endm - -/* - * Return IRQ number in irqnr. Also return processor Z flag status in CPSR - * as set if an interrupt is pending. - */ - .macro get_irqnr_and_base, irqnr, irqstat, base, tmp - ldr \irqstat, [\base, #LPC32XX_INTC_MASKED_STATUS_OFS] - clz \irqnr, \irqstat - rsb \irqnr, \irqnr, #31 - teq \irqstat, #0 - .endm diff --git a/arch/arm/mach-lpc32xx/include/mach/hardware.h b/arch/arm/mach-lpc32xx/include/mach/hardware.h deleted file mode 100644 index 4866f096ffce..000000000000 --- a/arch/arm/mach-lpc32xx/include/mach/hardware.h +++ /dev/null @@ -1,25 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ -/* - * arch/arm/mach-lpc32xx/include/mach/hardware.h - * - * Copyright (c) 2005 MontaVista Software, Inc. - */ - -#ifndef __ASM_ARCH_HARDWARE_H -#define __ASM_ARCH_HARDWARE_H - -/* - * Start of virtual addresses for IO devices - */ -#define IO_BASE 0xF0000000 - -/* - * This macro relies on fact that for all HW i/o addresses bits 20-23 are 0 - */ -#define IO_ADDRESS(x) IOMEM(((((x) & 0xff000000) >> 4) | ((x) & 0xfffff)) |\ - IO_BASE) - -#define io_p2v(x) ((void __iomem *) (unsigned long) IO_ADDRESS(x)) -#define io_v2p(x) ((((x) & 0x0ff00000) << 4) | ((x) & 0x000fffff)) - -#endif diff --git a/arch/arm/mach-lpc32xx/include/mach/uncompress.h b/arch/arm/mach-lpc32xx/include/mach/uncompress.h index a568812a0b91..74b7aa0da0e4 100644 --- a/arch/arm/mach-lpc32xx/include/mach/uncompress.h +++ b/arch/arm/mach-lpc32xx/include/mach/uncompress.h @@ -12,15 +12,13 @@ #include -#include -#include - /* * Uncompress output is hardcoded to standard UART 5 */ #define UART_FIFO_CTL_TX_RESET (1 << 2) #define UART_STATUS_TX_MT (1 << 6) +#define LPC32XX_UART5_BASE 0x40090000 #define _UARTREG(x) (void __iomem *)(LPC32XX_UART5_BASE + (x)) diff --git a/arch/arm/mach-lpc32xx/include/mach/platform.h b/arch/arm/mach-lpc32xx/lpc32xx.h similarity index 98% rename from arch/arm/mach-lpc32xx/include/mach/platform.h rename to arch/arm/mach-lpc32xx/lpc32xx.h index 1c53790444fc..5eeb884a1993 100644 --- a/arch/arm/mach-lpc32xx/include/mach/platform.h +++ b/arch/arm/mach-lpc32xx/lpc32xx.h @@ -7,8 +7,8 @@ * Copyright (C) 2010 NXP Semiconductors */ -#ifndef __ASM_ARCH_PLATFORM_H -#define __ASM_ARCH_PLATFORM_H +#ifndef __ARM_LPC32XX_H +#define __ARM_LPC32XX_H #define _SBF(f, v) ((v) << (f)) #define _BIT(n) _SBF(n, 1) @@ -700,4 +700,18 @@ #define LPC32XX_USB_OTG_DEV_CLOCK_ON _BIT(1) #define LPC32XX_USB_OTG_HOST_CLOCK_ON _BIT(0) +/* + * Start of virtual addresses for IO devices + */ +#define IO_BASE 0xF0000000 + +/* + * This macro relies on fact that for all HW i/o addresses bits 20-23 are 0 + */ +#define IO_ADDRESS(x) IOMEM(((((x) & 0xff000000) >> 4) | ((x) & 0xfffff)) |\ + IO_BASE) + +#define io_p2v(x) ((void __iomem *) (unsigned long) IO_ADDRESS(x)) +#define io_v2p(x) ((((x) & 0x0ff00000) << 4) | ((x) & 0x000fffff)) + #endif diff --git a/arch/arm/mach-lpc32xx/pm.c b/arch/arm/mach-lpc32xx/pm.c index 32bca351a73b..b27fa1b9f56c 100644 --- a/arch/arm/mach-lpc32xx/pm.c +++ b/arch/arm/mach-lpc32xx/pm.c @@ -70,8 +70,7 @@ #include -#include -#include +#include "lpc32xx.h" #include "common.h" #define TEMP_IRAM_AREA IO_ADDRESS(LPC32XX_IRAM_BASE) diff --git a/arch/arm/mach-lpc32xx/serial.c b/arch/arm/mach-lpc32xx/serial.c index cfb35e5691cd..3e765c4bf986 100644 --- a/arch/arm/mach-lpc32xx/serial.c +++ b/arch/arm/mach-lpc32xx/serial.c @@ -16,8 +16,7 @@ #include #include -#include -#include +#include "lpc32xx.h" #include "common.h" #define LPC32XX_SUART_FIFO_SIZE 64 diff --git a/arch/arm/mach-lpc32xx/suspend.S b/arch/arm/mach-lpc32xx/suspend.S index 374f9f07fe48..3f0a8282ef6f 100644 --- a/arch/arm/mach-lpc32xx/suspend.S +++ b/arch/arm/mach-lpc32xx/suspend.S @@ -11,8 +11,7 @@ */ #include #include -#include -#include +#include "lpc32xx.h" /* Using named register defines makes the code easier to follow */ #define WORK1_REG r0 From patchwork Fri Aug 9 14:40:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 170945 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp10106683ile; Fri, 9 Aug 2019 07:46:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqx1nveR1Pt3ryLDlvz9kjh3qXt0zbT2VNaiB32BSpVOQ1FVhYLK1ftm++UykNiTKT6zUIjR X-Received: by 2002:aa7:8502:: with SMTP id v2mr21351203pfn.98.1565362002908; Fri, 09 Aug 2019 07:46:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565362002; cv=none; d=google.com; s=arc-20160816; b=HFwCNfFsHF6kAQpegJEZjbdZCoPyjgeS+YXbYw5ZOKqcZyIH3qCYtaQwzsUU7IGgHR V2T/hs8nddFMmbrvFYYG9DAVzMzX+OFhGyj62iFmVqlMScR7TtUdpbMotGZnARmTNV7z uiwKUoFWvecz4Xl7EjSJL2n6M89EV9TdUxQVkzFTyj8izl322kYuMdOkhZJ6HiIBnCIm +xz+ENI+nr6cpWJKxqLTUt2ORBXSCBz+WjxFPecr/55YsNIfnMmwUs2cViEcod5mf1Al KPVUF9EDfyYz9zy12HyjVAmeOCD/OX1bVC7d4vk8QnGDdjkEtOJErs1ofJTjU/iNBRfs lOFw== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=7iDmYEowjVwAWkY1j3iYv4wqLWY12lnCElNFVh/fwcU=; b=ZTOjRcapP6673yZSD8quNcGLRIxZADE0ORKAtUp+4dMLvNsj4t7OWQtgbIvLQaBM3A o5JlbEYrGoozJvLXbAG1PsYp6InrzjK9kW1qjSHLNLlJv77id4zJCco0HAo+CebjgfGb hFswicRlhtSGBUrI+idcpGk5SV4lYBL8csSfZwOw9P4XozPPSgBPseWuXZRBBqifQI5H w7nQ02QAyquKe8UemJB/JADrgEU90/3aXz7ahZQWKq3alZujP5fSmXwKdC8d6kVXlQtp ekmkRXQSG1li8V6Fm4eLNADDH8nO7mtsJazTPYkIiLT0bMQWr3DZLDPcjFUUezA1fWGL ihGg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l35si50492557plb.186.2019.08.09.07.46.42; Fri, 09 Aug 2019 07:46:42 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407229AbfHIOql (ORCPT + 28 others); Fri, 9 Aug 2019 10:46:41 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:37867 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726342AbfHIOql (ORCPT ); Fri, 9 Aug 2019 10:46:41 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPA (Nemesis) id 1M91Tq-1hzxWA3eR4-0068fZ; Fri, 09 Aug 2019 16:46:32 +0200 From: Arnd Bergmann To: soc@kernel.org Cc: Vladimir Zapolskiy , Sylvain Lemieux , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH v2 13/13] ARM: lpc32xx: allow multiplatform build Date: Fri, 9 Aug 2019 16:40:39 +0200 Message-Id: <20190809144043.476786-14-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190809144043.476786-1-arnd@arndb.de> References: <20190809144043.476786-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:ZpjjCgarnGP5OJJp7WqQXWJgBqErfvsp1pHllIlsTishTCM846M jagMW25mCiPe3qu3M4uGN7g2QnCf34G9GnKrz0TqjJSnZ6Q+XkjB4nyDo8UTs99GPTy1W9+ mVhPZdrw8O3cYMWo/365dZVg+gK46PHAFFZYy5FcyFbaoNKm8JEbKDRWzI+ikSvh3TL8+cg t0242PhtMh68LzzfofLMA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:mGfmQMJJPbM=:2+AUq2ZbO8MpEuFsuTDE3V /Wrx2sOiWCbaNdmELUyYovk+spLUFWeBJMcah1lTc/GaQWLv64cDA7p+pJhQU4qDQsG0z0y0I xJ+E2H4bWCF9ELfnBmJXulydXgn40JBRN+5CBpvShd4XY2ctVQdg+qcB9yBrbTMiN4IVpgh/4 f9hlw1NtkFuWgeYybeBQsuy535prRveYOqn2BCIAHxWmNhVj2CnKNv7ySWPomminyBKgZzux/ MEsPCXPyYE/YyiWzyd8yjazfKr2FnKM4swS6YKHb112HOSiNeznqxMN+xHdkxwcpj3sCJ+LlY CPWDK3UjP5TVfjV1LqPv2KZ/na1PR8D8rFVXg+LhqIKob9WbGqbMegl/7RY0V0gvu91gjopSD L6El8+Nw//G9NySUkDuXFpqtz4UENAMjsh/zXKos7xmjywn0OjUZRpg7uCvjF8cVt3YkwTzbl 1yq7KtY2EJ/whp1KqtUdsIx5Lu7LwFECQqD4Q8dtMkbUs4aWzv1RG7Eio+XFkGYXuO0z770u9 kWPktzcKQiO8GyxwAfXLOUckSaY4p9ZRkx4Z/avI+Yj3xjd+5dZfc0vVe6wv/5mDy4gknfzk3 mBjH1tEAGc56m/qRIA0MBCL2aGZRE9jXwZlIOOkyKqIwiFdxReT/NqQx/QYBfZtvHOkegNXIJ UYIb7QJA7jST+yVcIsmS21pomW9dsHq0mU/CkxqloLr9nM9K8+0A1AIvjMxyNOCZVYxPDJvIn c0GsggycoOG0ikntFiudD2ZptPiVcBa4VsmlEA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org All preparation work is done, so the platform can finally be moved into ARCH_MULTIPLATFORM. This requires a small change to the defconfig file to enable the platform. Signed-off-by: Arnd Bergmann --- arch/arm/Kconfig | 17 +------ arch/arm/configs/lpc32xx_defconfig | 1 + arch/arm/mach-lpc32xx/Kconfig | 11 +++++ .../mach-lpc32xx/include/mach/uncompress.h | 48 ------------------- 4 files changed, 14 insertions(+), 63 deletions(-) create mode 100644 arch/arm/mach-lpc32xx/Kconfig delete mode 100644 arch/arm/mach-lpc32xx/include/mach/uncompress.h -- 2.20.0 diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 33b00579beff..65808e17cb3b 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -478,21 +478,6 @@ config ARCH_W90X900 -config ARCH_LPC32XX - bool "NXP LPC32XX" - select ARM_AMBA - select CLKDEV_LOOKUP - select CLKSRC_LPC32XX - select COMMON_CLK - select CPU_ARM926T - select GENERIC_CLOCKEVENTS - select GENERIC_IRQ_MULTI_HANDLER - select GPIOLIB - select SPARSE_IRQ - select USE_OF - help - Support for the NXP LPC32XX family of processors - config ARCH_PXA bool "PXA2xx/PXA3xx-based" depends on MMU @@ -746,6 +731,8 @@ source "arch/arm/mach-keystone/Kconfig" source "arch/arm/mach-ks8695/Kconfig" +source "arch/arm/mach-lpc32xx/Kconfig" + source "arch/arm/mach-mediatek/Kconfig" source "arch/arm/mach-meson/Kconfig" diff --git a/arch/arm/configs/lpc32xx_defconfig b/arch/arm/configs/lpc32xx_defconfig index 3772d5a8975a..09deb57db942 100644 --- a/arch/arm/configs/lpc32xx_defconfig +++ b/arch/arm/configs/lpc32xx_defconfig @@ -12,6 +12,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_SYSCTL_SYSCALL=y CONFIG_EMBEDDED=y CONFIG_SLAB=y +# CONFIG_ARCH_MULTI_V7 is not set CONFIG_ARCH_LPC32XX=y CONFIG_AEABI=y CONFIG_ZBOOT_ROM_TEXT=0x0 diff --git a/arch/arm/mach-lpc32xx/Kconfig b/arch/arm/mach-lpc32xx/Kconfig new file mode 100644 index 000000000000..ec87c65f4536 --- /dev/null +++ b/arch/arm/mach-lpc32xx/Kconfig @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: GPL-2.0-only + +config ARCH_LPC32XX + bool "NXP LPC32XX" + depends on ARCH_MULTI_V5 + select ARM_AMBA + select CLKSRC_LPC32XX + select CPU_ARM926T + select GPIOLIB + help + Support for the NXP LPC32XX family of processors diff --git a/arch/arm/mach-lpc32xx/include/mach/uncompress.h b/arch/arm/mach-lpc32xx/include/mach/uncompress.h deleted file mode 100644 index 74b7aa0da0e4..000000000000 --- a/arch/arm/mach-lpc32xx/include/mach/uncompress.h +++ /dev/null @@ -1,48 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ -/* - * arch/arm/mach-lpc32xx/include/mach/uncompress.h - * - * Author: Kevin Wells - * - * Copyright (C) 2010 NXP Semiconductors - */ - -#ifndef __ASM_ARM_ARCH_UNCOMPRESS_H -#define __ASM_ARM_ARCH_UNCOMPRESS_H - -#include - -/* - * Uncompress output is hardcoded to standard UART 5 - */ - -#define UART_FIFO_CTL_TX_RESET (1 << 2) -#define UART_STATUS_TX_MT (1 << 6) -#define LPC32XX_UART5_BASE 0x40090000 - -#define _UARTREG(x) (void __iomem *)(LPC32XX_UART5_BASE + (x)) - -#define LPC32XX_UART_DLLFIFO_O 0x00 -#define LPC32XX_UART_IIRFCR_O 0x08 -#define LPC32XX_UART_LSR_O 0x14 - -static inline void putc(int ch) -{ - /* Wait for transmit FIFO to empty */ - while ((__raw_readl(_UARTREG(LPC32XX_UART_LSR_O)) & - UART_STATUS_TX_MT) == 0) - ; - - __raw_writel((u32) ch, _UARTREG(LPC32XX_UART_DLLFIFO_O)); -} - -static inline void flush(void) -{ - __raw_writel(__raw_readl(_UARTREG(LPC32XX_UART_IIRFCR_O)) | - UART_FIFO_CTL_TX_RESET, _UARTREG(LPC32XX_UART_IIRFCR_O)); -} - -/* NULL functions; we don't presently need them */ -#define arch_decomp_setup() - -#endif