From patchwork Mon Jun 6 09:44:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siva Durga Prasad Paladugu X-Patchwork-Id: 630756 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3rNVFC0b7hz9snm for ; Mon, 6 Jun 2016 19:45:51 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5AFFE4B801; Mon, 6 Jun 2016 11:45:49 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gzR-9pOl19LV; Mon, 6 Jun 2016 11:45:49 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F3F62A7514; Mon, 6 Jun 2016 11:45:38 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 47CDFA74D0 for ; Mon, 6 Jun 2016 11:45:11 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id C7s77XGcHe5M for ; Mon, 6 Jun 2016 11:45:11 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0083.outbound.protection.outlook.com [104.47.36.83]) by theia.denx.de (Postfix) with ESMTPS id 9F4F9A7514 for ; Mon, 6 Jun 2016 11:45:06 +0200 (CEST) Received: from CY1NAM02FT024.eop-nam02.prod.protection.outlook.com (10.152.74.54) by CY1NAM02HT147.eop-nam02.prod.protection.outlook.com (10.152.75.91) with Microsoft SMTP Server (TLS) id 15.1.497.8; Mon, 6 Jun 2016 09:45:03 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; lists.denx.de; dkim=none (message not signed) header.d=none;lists.denx.de; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by CY1NAM02FT024.mail.protection.outlook.com (10.152.74.210) with Microsoft SMTP Server (TLS) id 15.1.511.7 via Frontend Transport; Mon, 6 Jun 2016 09:45:03 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1b9r5h-00089p-4D; Mon, 06 Jun 2016 02:45:01 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1b9r5i-0003Z0-5X; Mon, 06 Jun 2016 02:45:02 -0700 Received: from xsj-pvapsmtp01 (xsj-smtp1.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id u569j0Jn032561; Mon, 6 Jun 2016 02:45:00 -0700 Received: from [172.23.146.171] (helo=xhdl3763.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1b9r5f-0003Vq-RT; Mon, 06 Jun 2016 02:45:00 -0700 Received: by xhdl3763.xilinx.com (Postfix, from userid 13899) id 0A9082CE04ED; Mon, 6 Jun 2016 15:14:58 +0530 (IST) From: Siva Durga Prasad Paladugu To: Date: Mon, 6 Jun 2016 15:14:46 +0530 Message-ID: <1465206294-38490-1-git-send-email-sivadur@xilinx.com> X-Mailer: git-send-email 2.1.1 X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-22374.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(438002)(199003)(189002)(2906002)(4326007)(5003940100001)(450100001)(50986999)(87936001)(47776003)(11100500001)(50466002)(52956003)(6806005)(5008740100001)(103686003)(33646002)(48376002)(229853001)(81166006)(110136002)(8936002)(106466001)(19580395003)(8676002)(81156014)(86362001)(2351001)(92566002)(189998001)(46386002)(42186005)(50226002)(4001430100002)(36386004)(90966002)(19580405001)(36756003)(63266004)(45336002)(107886002)(586003)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1NAM02HT147; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; PTR:unknown-60-83.xilinx.com; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 3e6857fe-c82f-40d3-2e14-08d38def3c13 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501002); SRVR:CY1NAM02HT147; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13017025)(13015025)(13023025)(5005006)(8121501046)(13018025)(13024025)(3002001)(10201501046)(6055026); SRVR:CY1NAM02HT147; BCL:0; PCL:0; RULEID:; SRVR:CY1NAM02HT147; X-Forefront-PRVS: 096507C068 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2016 09:45:03.2868 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1NAM02HT147 Cc: michals@xilinx.com, Siva Durga Prasad Paladugu Subject: [U-Boot] [PATCH 1/9] spi: zynq_qspi: Add quad support for zynq qspi X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add quad commands supports for zynq qspi driver Signed-off-by: Siva Durga Prasad Paladugu --- - Tested on zc702 board --- drivers/spi/zynq_qspi.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/drivers/spi/zynq_qspi.c b/drivers/spi/zynq_qspi.c index b98663c..e636244 100644 --- a/drivers/spi/zynq_qspi.c +++ b/drivers/spi/zynq_qspi.c @@ -11,7 +11,9 @@ #include #include #include +#include #include +#include "../mtd/spi/sf_internal.h" DECLARE_GLOBAL_DATA_PTR; @@ -156,6 +158,17 @@ static void zynq_qspi_init_hw(struct zynq_qspi_priv *priv) writel(ZYNQ_QSPI_ENR_SPI_EN_MASK, ®s->enr); } +static int zynq_qspi_child_pre_probe(struct udevice *bus) +{ + struct spi_slave *slave = dev_get_parent_priv(bus); + + slave->mode_rx = QUAD_OUTPUT_FAST; + slave->mode = SPI_TX_QUAD; + slave->no_all_quad = 1; + + return 0; +} + static int zynq_qspi_probe(struct udevice *bus) { struct zynq_qspi_platdata *plat = dev_get_platdata(bus); @@ -627,4 +640,5 @@ U_BOOT_DRIVER(zynq_qspi) = { .platdata_auto_alloc_size = sizeof(struct zynq_qspi_platdata), .priv_auto_alloc_size = sizeof(struct zynq_qspi_priv), .probe = zynq_qspi_probe, + .child_pre_probe = zynq_qspi_child_pre_probe, };