From patchwork Fri Apr 12 12:52:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 209 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id DA9123F033 for ; Fri, 12 Apr 2019 14:53:40 +0200 (CEST) Received: by mail-pl1-f200.google.com with SMTP id gn10sf5850417plb.23 for ; Fri, 12 Apr 2019 05:53:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1555073619; cv=pass; d=google.com; s=arc-20160816; b=oDIpuQmwu1FhLGsgK4gWIFvRkOn1PI32hVxGVWXOealCtvR95y+R4g5FzSC2vOXkUY DTQmOYH6I07htLqMiu4V3vs1Z3ISaOaAlXQU2oK672HFiGejQQEJNHn15UjPcC4LzxoX C8CyPPAq/zWEHZt5zg/MlOBBhur74xsWv1V3c9YNPwT1+DNuNzJZUpBVLsSqelFgvum7 ZTbfkLpPd/3ZYvY5YCQPVM6z4+VGcbEWdObT2kDRu2bzHxszaBFdy27blwEFTORBY/U3 UKOb9/ak/cCr+8MWyf++XQOeActzq/6+RylO+J+grubCwj3/e+PSLr4D8G6Kf5Zoli4Z lq+A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=uw/1+82o5HcbUkCp1ty1I6lnCB5ivC70REtJkzA6mHs=; b=0Fk0A4bKWL3AYpFaYOhqN0m3ThfxxqTKN1ymTTm6CxmctrLQdojtubX7ez3KXeib1m iZHKkBAHNBJxJmj7s3uI31CWSxuqrLvKzMhdlyUfgbxwgKgmfzBH04e8dpmAcyzh17dL aRa3hhh2m078gD/f1y2RgKeGVXusGrE58l914TF4WD05QH7GC1kXyPu9/fJ8zYIdfuto 43aMTp/i+dXl3fAD/X462RHfH0OzxiWZY9CNEkTGiJ81wHTSP9FnJy9/HRBFj9v3wjyu hVHasx1a31OcUvq2HI06uW7TcGu0ekNqlzCVY2o6EkLtKECiuH90kxX+pnM2wN0gfTm8 ElGA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dzyahT4G; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=uw/1+82o5HcbUkCp1ty1I6lnCB5ivC70REtJkzA6mHs=; b=M3z/FEdPdvvX7516oHbIxKlYP45AA+sROnW6miwOK8ptUqL+gqYYf3OpwjeDb2nmtR nkpVRiTE7PBYAbhJS+36o1f6UEPuJdbGBVxmWYTX9KrLF7/xzJ86SOhkttZvnvgqy6+N CYivWMDCtchnRwI+sKN+py6GMuXyKeSvF1DFI= 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:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=uw/1+82o5HcbUkCp1ty1I6lnCB5ivC70REtJkzA6mHs=; b=TmYRYTySO6yBzWmpIQwUosSw+9Yc8aOZamxA49mzVfmE+p222Uyh+MEPWCOC7lYoJO Tads1v08gp7uiICtoF7vj035wfmxAKUwCIUHnra525S2dnEXlNBqgnPdOa9AmRJOns9y l74pOmMyHL/OLFBf6ZxuAp7z2gZMB8ICwBGBo0d8Z4L0uC8ZEctBq74Vdgr93zyekR/X /3CB8W6LEWPTQM+ine7jWl2niFisCZcOsskq260Dz9DpzZcMt7G2Y2PPkYrp0CW7C8NU F2dwrKTbqz/ZtxurGdyqBvs9QqezrlquCd+6vTpLNB5bhpDN22a9QvdGxrdZ4LzVysoY JNbw== X-Gm-Message-State: APjAAAWXHIF4cnCvlyiVGGf1qil1NJ2dwU40jGpXtYJqbzOtOOESwKVb t62CjNV+MRzr52pUfJFJmSRjX2sh X-Google-Smtp-Source: APXvYqzmWxRWZM+ARU5iBx4ylbiZAp6yxBHWfTxDnqf8QjN7bK6SWwR9m0nKWZt2ijeusM7qaF2Taw== X-Received: by 2002:aa7:8b8a:: with SMTP id r10mr1666863pfd.59.1555073619612; Fri, 12 Apr 2019 05:53:39 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:bb8c:: with SMTP id m12ls2637927pls.16.gmail; Fri, 12 Apr 2019 05:53:39 -0700 (PDT) X-Received: by 2002:a17:902:722:: with SMTP id 31mr31160736pli.83.1555073619228; Fri, 12 Apr 2019 05:53:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555073619; cv=none; d=google.com; s=arc-20160816; b=LUu1d7QX4NXdtDkJb+RBb25mYiqPIPmiV8xF98utG8ufqdv7iYNSZtS72zlArz9+Xn r3x1ytJnA1Uq+1/otVVrI0DcKNhkwyN2tvQ+Lbam7n6bdPrXVEy4ilyL55uO2im4k8JZ rl39DqOOjkLDpGT9Va89mYIyGykKauMQ3e81zYpshxktDGN0t67VftfaxrPwrIANXAWy KTBeSi5haeCrSxzNuAaFpgMZHgsovBvnXTYE7w3TnCyZ/5s1QGWLpMuM/0bFvJ+QrOan nmJicsjXIBkrMPW320p+dT5K+s92wRHUWxZKd3B6A1Rlb6BKGGXE3K6UtZ4H0e05SBzA PZ3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=QkCMIiim7Oq0uaO0qclv0Xytw7ZJr3mUF8wXMw2bqK8=; b=nP7pgR6fA4WzwQJitBBkPfi/YntaZhGVfePPMQu4zgCzKTyousCe7Z3O2+1zXIOR2p KIsELhFJnpnQTxSi+T83YXRqDHMZ7+E0fLT3CK//NlunPZvxNSrn2G1x6X9Yz6qSzChM +oSiA9XwmfRyj9ClWmJ3dVz4QLfu/VtEakH4adE2SByZiGKdt1iP/7LOWwSPrjDWKSfP /N8bjWiA69h5OiZBtW7JhAgcsNmoouvjWsag/h+DOxRol6wR4mpFyxcAeKGb4YNrQYCM tK+SEvfKqnqvTm9Xf75FMTMLgnNEPWCfAlr1BD6MS+M78SsmYP0DhwbmQlV9umPNQZ3t 60Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dzyahT4G; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id e39sor20278450plg.64.2019.04.12.05.53.39 for (Google Transport Security); Fri, 12 Apr 2019 05:53:39 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:902:521:: with SMTP id 30mr26491093plf.248.1555073618912; Fri, 12 Apr 2019 05:53:38 -0700 (PDT) Received: from jagan-XPS-13-9350.domain.name ([103.81.77.13]) by smtp.gmail.com with ESMTPSA id g73sm72649819pfd.185.2019.04.12.05.53.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Apr 2019 05:53:38 -0700 (PDT) From: Jagan Teki To: Hans de Goede , Iain Paton , Olliver Schinagl , Marcus Cooper , Adam Sampson , FUKAUMI Naoki , Stefan Mavrodiev , Ian Campbell , Chen-Yu Tsai , Jelle de Jong , Aleksei Mamlin , =?utf-8?q?Pablo_Sebasti=C3=A1n_Greco?= , Peter Robinson Cc: Maxime Ripard , u-boot@lists.denx.de, linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com, Andre Przywara , Jagan Teki Subject: [PATCH 7/7] sunxi: update SATA driver to always use DM_SCSI Date: Fri, 12 Apr 2019 18:22:36 +0530 Message-Id: <20190412125236.12748-8-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190412125236.12748-1-jagan@amarulasolutions.com> References: <20190412125236.12748-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dzyahT4G; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Andre Przywara It seems like the Allwinner SATA driver is already quite capable of using the driver model, so we can force this on all boards and can remove support for a non-DM_SCSI build. This removes the warning about boards with SATA ports not being DM_SCSI compliant. It also takes the opportunity to move the driver out of the board/sunxi directory to join its siblings in drivers/ata, and to make it a proper Kconfig citizen. The board defconfigs stay untouched. Signed-off-by: Andre Przywara Reviewed-by: Simon Glass Reviewed-by: Jagan Teki [jagan: select DM_SCSI separately] Signed-off-by: Jagan Teki --- board/sunxi/Makefile | 3 --- drivers/ata/Kconfig | 8 ++++++++ drivers/ata/Makefile | 1 + board/sunxi/ahci.c => drivers/ata/ahci_sunxi.c | 10 ---------- include/configs/sunxi-common.h | 6 ------ scripts/config_whitelist.txt | 1 - 6 files changed, 9 insertions(+), 20 deletions(-) rename board/sunxi/ahci.c => drivers/ata/ahci_sunxi.c (94%) diff --git a/board/sunxi/Makefile b/board/sunxi/Makefile index 4d6258d932..c4e13f8c38 100644 --- a/board/sunxi/Makefile +++ b/board/sunxi/Makefile @@ -8,9 +8,6 @@ # Wolfgang Denk, DENX Software Engineering, wd@denx.de. obj-y += board.o obj-$(CONFIG_SUN7I_GMAC) += gmac.o -ifndef CONFIG_SPL_BUILD -obj-$(CONFIG_SUNXI_AHCI) += ahci.o -endif obj-$(CONFIG_MACH_SUN4I) += dram_sun4i_auto.o obj-$(CONFIG_MACH_SUN5I) += dram_sun5i_auto.o obj-$(CONFIG_MACH_SUN7I) += dram_sun5i_auto.o diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index 49a056e941..b7addaf785 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig @@ -99,6 +99,14 @@ config SATA_SIL3114 help Enable this driver to support the SIL3114 SATA controllers. +config SUNXI_AHCI + bool "Enable Allwinner SATA driver support" + depends on AHCI + default y if ARCH_SUNXI + help + Enable this driver to support the SATA controllers found in the + Allwinner A10, A20 and R40 SoCs. + config AHCI_MVEBU bool "Marvell EBU AHCI SATA support" depends on ARCH_MVEBU diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile index 10bed53bb3..a69edb10f7 100644 --- a/drivers/ata/Makefile +++ b/drivers/ata/Makefile @@ -18,3 +18,4 @@ obj-$(CONFIG_SATA_SIL3114) += sata_sil3114.o obj-$(CONFIG_SATA_SIL) += sata_sil.o obj-$(CONFIG_SANDBOX) += sata_sandbox.o obj-$(CONFIG_AHCI_MVEBU) += ahci_mvebu.o +obj-$(CONFIG_SUNXI_AHCI) += ahci_sunxi.o diff --git a/board/sunxi/ahci.c b/drivers/ata/ahci_sunxi.c similarity index 94% rename from board/sunxi/ahci.c rename to drivers/ata/ahci_sunxi.c index 9b03013667..77b932aa03 100644 --- a/board/sunxi/ahci.c +++ b/drivers/ata/ahci_sunxi.c @@ -70,15 +70,6 @@ static int sunxi_ahci_phy_init(u8 *reg_base) return 0; } -#ifndef CONFIG_DM_SCSI -void scsi_init(void) -{ - if (sunxi_ahci_phy_init((u8 *)SUNXI_SATA_BASE) < 0) - return; - - ahci_init((void __iomem *)SUNXI_SATA_BASE); -} -#else static int sunxi_sata_probe(struct udevice *dev) { ulong base; @@ -132,4 +123,3 @@ U_BOOT_DRIVER(ahci_sunxi_drv) = { .bind = sunxi_sata_bind, .probe = sunxi_sata_probe, }; -#endif diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index b01d1c3c84..bc30994029 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -104,13 +104,7 @@ #define PHYS_SDRAM_0_SIZE 0x80000000 /* 2 GiB */ #ifdef CONFIG_AHCI -#define CONFIG_SCSI_AHCI_PLAT -#define CONFIG_SUNXI_AHCI #define CONFIG_SYS_64BIT_LBA -#define CONFIG_SYS_SCSI_MAX_SCSI_ID 1 -#define CONFIG_SYS_SCSI_MAX_LUN 1 -#define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ - CONFIG_SYS_SCSI_MAX_LUN) #endif #define CONFIG_SETUP_MEMORY_TAGS diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 8c7c1592a5..c58b964065 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -1939,7 +1939,6 @@ CONFIG_STV0991 CONFIG_STV0991_HZ CONFIG_STV0991_HZ_CLOCK CONFIG_ST_SMI -CONFIG_SUNXI_AHCI CONFIG_SUNXI_GPIO CONFIG_SUNXI_MAX_FB_SIZE CONFIG_SUPERH_ON_CHIP_R8A66597