From patchwork Tue Feb 6 17:12:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 869946 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="A5Vey3+z"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zbWQs5gQpz9sNx for ; Wed, 7 Feb 2018 04:19:16 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id ECC94C21E64; Tue, 6 Feb 2018 17:19:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 956E2C21E16; Tue, 6 Feb 2018 17:18:46 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C8447C21E11; Tue, 6 Feb 2018 17:18:44 +0000 (UTC) Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by lists.denx.de (Postfix) with ESMTPS id AC5E6C21DB0 for ; Tue, 6 Feb 2018 17:18:10 +0000 (UTC) Received: by mail-pf0-f193.google.com with SMTP id z79so892381pff.13 for ; Tue, 06 Feb 2018 09:18:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=nMTEmAbkLrPeF9GalsDcSUsJT6kuiZ4ds5AJIr00kEM=; b=A5Vey3+zhc0yCc8GVbwYL54++LBHUmanwTN6dFTs0Oy8tgOD1xeL9EtC1MJRKnjwrR gDStn21xmupM8pofQBLjBjqVS4Lm2xXf3OJl0//nClN6BDnStQVXN1xQPwX7WK7cYifw ox0EqcfuVZohJLUz/kWeFg3fi6JbBjnVDDYnhWDb2UItuwRQKeqazDs27+CeGaDShT2a a7R4RZc+vnYuzAjCY5j+ooQrtnf5716OBLbtW8q01D9beuQd3O0OKxr3YqVN+PpbshLV oohYIKDr1ZnBNoyvHythqcYYbJ9+KS4Km6NmqbU4d84TD0Uak7ZjjFarwMmCMby6yROP waSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=nMTEmAbkLrPeF9GalsDcSUsJT6kuiZ4ds5AJIr00kEM=; b=gLFt19Xr77JuyPSyXMmxe/xLgXpijhtqjFGCpOVtyW3Cs2/xXy/y0/LJW5J0TdDiTK pA2P7UHW8ZJWQ/W1Q9+YsUK7GLwhjguqxfF7A/vkP2gl/8cEqsaZne/xMO2J9UXIJLCu Gq3TMoGCO6UuSX5IZ+awEyzR6JCP8veXVYUgGWq4Hg1qR9ZL3McMFB2Gm/nkLybE1wT3 oTG/rhk8nf4U3617mJBy+So03a7ETpcy+E3AduXhqshE+n/3DFiWSXoTmDP7mX0gvz7T Ner0ATj07hLqz6L6nJGs1/BPBDV8wh72Z/uf61Z/womJcU1MOQrG6hbPjyprl/m6w93G 9NEw== X-Gm-Message-State: APf1xPC7NZWuWF6PDXBqXet0ksWf2USh/XQIFlNxQojiKTxvCaZAnIgp dGQ1eCUQ0IyedJs4LJQiGZ57KSks X-Google-Smtp-Source: AH8x2256tRAMSpzHNVyJQsQ6s2fTzdbRR5BpmVrQPFlecy+M194y8Yzf62dl0LmAjt9NkIiA3sMo1Q== X-Received: by 10.99.9.1 with SMTP id 1mr2517256pgj.257.1517937488802; Tue, 06 Feb 2018 09:18:08 -0800 (PST) Received: from localhost.localdomain ([115.97.187.51]) by smtp.gmail.com with ESMTPSA id o2sm18326131pgq.87.2018.02.06.09.18.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 06 Feb 2018 09:18:08 -0800 (PST) From: Jagan Teki X-Google-Original-From: Jagan Teki To: Maxime Ripard Date: Tue, 6 Feb 2018 22:42:56 +0530 Message-Id: <1517937176-22491-1-git-send-email-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.7.4 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH] arm: sunxi: Move spl spi sunxi code to mach-sunxi X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This SUNXI variant SPL SPI code doesn't use either SPI or SPL_FLASG subsystems due to size constraints and also placing this code in drivers/mtd/spi will unnecessary build SPI_FLASH code(if defined) which never required, hence moved to arch area. And also renamed the file according to kconfig which resembles proper name. Signed-off-by: Jagan Teki --- arch/arm/mach-sunxi/Kconfig | 8 ++++++++ arch/arm/mach-sunxi/Makefile | 1 + .../sunxi_spi_spl.c => arch/arm/mach-sunxi/spl_spi_sunxi.c | 0 drivers/mtd/spi/Kconfig | 13 ------------- drivers/mtd/spi/Makefile | 1 - 5 files changed, 9 insertions(+), 14 deletions(-) rename drivers/mtd/spi/sunxi_spi_spl.c => arch/arm/mach-sunxi/spl_spi_sunxi.c (100%) diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index 1fededd..dc48eef 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -847,4 +847,12 @@ config SPL_STACK_R_ADDR default 0x2fe00000 if MACH_SUN9I default 0x4fe00000 if MACH_SUN50I +config SPL_SPI_SUNXI + bool "Support for SPI Flash on Allwinner SoCs in SPL" + depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || MACH_SUNXI_H3_H5 || MACH_SUN50I + help + Enable support for SPI Flash. This option allows SPL to read from + sunxi SPI Flash. It uses the same method as the boot ROM, so does + not need any extra configuration. + endif diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile index 2a3c379..6ddf682 100644 --- a/arch/arm/mach-sunxi/Makefile +++ b/arch/arm/mach-sunxi/Makefile @@ -48,6 +48,7 @@ obj-$(CONFIG_MACH_SUN7I) += dram_sun4i.o obj-$(CONFIG_MACH_SUN8I_A23) += dram_sun8i_a23.o obj-$(CONFIG_MACH_SUN8I_A33) += dram_sun8i_a33.o obj-$(CONFIG_MACH_SUN8I_A83T) += dram_sun8i_a83t.o +obj-$(CONFIG_SPL_SPI_SUNXI) += spl_spi_sunxi.o obj-$(CONFIG_SUNXI_DRAM_DW) += dram_sunxi_dw.o obj-$(CONFIG_SUNXI_DRAM_DW) += dram_timings/ obj-$(CONFIG_MACH_SUN9I) += dram_sun9i.o diff --git a/drivers/mtd/spi/sunxi_spi_spl.c b/arch/arm/mach-sunxi/spl_spi_sunxi.c similarity index 100% rename from drivers/mtd/spi/sunxi_spi_spl.c rename to arch/arm/mach-sunxi/spl_spi_sunxi.c diff --git a/drivers/mtd/spi/Kconfig b/drivers/mtd/spi/Kconfig index 6ba255d..4484cf8 100644 --- a/drivers/mtd/spi/Kconfig +++ b/drivers/mtd/spi/Kconfig @@ -135,17 +135,4 @@ config SPI_FLASH_MTD If unsure, say N -if SPL - -config SPL_SPI_SUNXI - bool "Support for SPI Flash on Allwinner SoCs in SPL" - depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || MACH_SUNXI_H3_H5 || MACH_SUN50I - select SPL_SPI_FLASH_SUPPORT - ---help--- - Enable support for SPI Flash. This option allows SPL to read from - sunxi SPI Flash. It uses the same method as the boot ROM, so does - not need any extra configuration. - -endif - endmenu # menu "SPI Flash Support" diff --git a/drivers/mtd/spi/Makefile b/drivers/mtd/spi/Makefile index fcda023..4be6e9b 100644 --- a/drivers/mtd/spi/Makefile +++ b/drivers/mtd/spi/Makefile @@ -9,7 +9,6 @@ obj-$(CONFIG_DM_SPI_FLASH) += sf-uclass.o ifdef CONFIG_SPL_BUILD obj-$(CONFIG_SPL_SPI_BOOT) += fsl_espi_spl.o -obj-$(CONFIG_SPL_SPI_SUNXI) += sunxi_spi_spl.o endif obj-$(CONFIG_SPI_FLASH) += sf_probe.o spi_flash.o spi_flash_ids.o sf.o