From patchwork Tue Mar 15 14:41:54 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Langlais X-Patchwork-Id: 569 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:43:55 -0000 Delivered-To: patches@linaro.org Received: by 10.151.46.5 with SMTP id y5cs72184ybj; Tue, 15 Mar 2011 07:42:48 -0700 (PDT) Received: by 10.213.102.68 with SMTP id f4mr49486ebo.53.1300200166878; Tue, 15 Mar 2011 07:42:46 -0700 (PDT) Received: from eu1sys200aog115.obsmtp.com (eu1sys200aog115.obsmtp.com [207.126.144.139]) by mx.google.com with SMTP id y2si20167855eeh.61.2011.03.15.07.42.42 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 Mar 2011 07:42:46 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.139 is neither permitted nor denied by best guess record for domain of philippe.langlais@stericsson.com) client-ip=207.126.144.139; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.139 is neither permitted nor denied by best guess record for domain of philippe.langlais@stericsson.com) smtp.mail=philippe.langlais@stericsson.com Received: from source ([164.129.1.35]) (using TLSv1) by eu1sys200aob115.postini.com ([207.126.147.11]) with SMTP ID DSNKTX964tliDFVKvbSCQW1+4T8nJTQyqnXn@postini.com; Tue, 15 Mar 2011 14:42:46 UTC Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 6D077164; Tue, 15 Mar 2011 14:42:41 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 2E6E024BA; Tue, 15 Mar 2011 14:42:41 +0000 (GMT) Received: from exdcvycastm022.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm022", Issuer "exdcvycastm022" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id 7DE99A80AD; Tue, 15 Mar 2011 15:42:35 +0100 (CET) Received: from localhost.localdomain (10.230.100.153) by smtp.stericsson.com (10.230.100.30) with Microsoft SMTP Server (TLS) id 8.2.254.0; Tue, 15 Mar 2011 15:42:40 +0100 From: Philippe Langlais To: Cc: , , , Prajadevi H Subject: [PATCH 2/4] amba-pl022: Add loopback support for the SPI on 5500 Date: Tue, 15 Mar 2011 15:41:54 +0100 Message-ID: <1300200116-12185-3-git-send-email-philippe.langlais@stericsson.com> X-Mailer: git-send-email 1.7.3.1 In-Reply-To: <1300200116-12185-1-git-send-email-philippe.langlais@stericsson.com> References: <1300200116-12185-1-git-send-email-philippe.langlais@stericsson.com> MIME-Version: 1.0 From: Prajadevi H Add new amba-pl022 vendor for the DB5500 pl023, as the pl023 on db8500 and db5500 vary. Signed-off-by: Prajadevi H --- drivers/spi/amba-pl022.c | 21 ++++++++++++++++++++- 1 files changed, 20 insertions(+), 1 deletions(-) diff --git a/drivers/spi/amba-pl022.c b/drivers/spi/amba-pl022.c index 5c2b092..413eaf0 100644 --- a/drivers/spi/amba-pl022.c +++ b/drivers/spi/amba-pl022.c @@ -324,6 +324,7 @@ struct vendor_data { bool unidir; bool extended_cr; bool pl023; + bool loopback; }; /** @@ -1983,7 +1984,7 @@ static int pl022_setup(struct spi_device *spi) SSP_WRITE_BITS(chip->cr0, clk_freq.scr, SSP_CR0_MASK_SCR, 8); /* Loopback is available on all versions except PL023 */ - if (!pl022->vendor->pl023) { + if (pl022->vendor->loopback) { if (spi->mode & SPI_LOOP) tmp = LOOPBACK_ENABLED; else @@ -2233,6 +2234,7 @@ static struct vendor_data vendor_arm = { .unidir = false, .extended_cr = false, .pl023 = false, + .loopback = true, }; @@ -2242,6 +2244,7 @@ static struct vendor_data vendor_st = { .unidir = false, .extended_cr = true, .pl023 = false, + .loopback = true, }; static struct vendor_data vendor_st_pl023 = { @@ -2250,6 +2253,16 @@ static struct vendor_data vendor_st_pl023 = { .unidir = false, .extended_cr = true, .pl023 = true, + .loopback = false, +}; + +static struct vendor_data vendor_db5500_pl023 = { + .fifodepth = 32, + .max_bpw = 32, + .unidir = false, + .extended_cr = true, + .pl023 = true, + .loopback = true, }; static struct amba_id pl022_ids[] = { @@ -2283,6 +2296,12 @@ static struct amba_id pl022_ids[] = { .mask = 0xffffffff, .data = &vendor_st_pl023, }, + { + .id = 0x00080023, + .mask = 0xffffffff, + .data = &vendor_db5500_pl023, + .name = "db5500-spi", + }, { 0, 0 }, };