All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Vipul Kumar <vipul.kumar@xilinx.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [UBOOT PATCH v3 1/3] spi: xilinx: Read reg base address from DTS file
Date: Thu, 21 Jun 2018 14:53:15 +0530	[thread overview]
Message-ID: <1529572997-5995-2-git-send-email-vipul.kumar@xilinx.com> (raw)
In-Reply-To: <1529572997-5995-1-git-send-email-vipul.kumar@xilinx.com>

From: Michal Simek <michal.simek@xilinx.com>

This patch added support to read register base address
from DTS file.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com>
---
Changes in v3:
- Read reg in probe function
- Removed xilinx_spi_ofdata_to_platdata function
- Removed reading of fifo_depth
---
 drivers/spi/xilinx_spi.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/spi/xilinx_spi.c b/drivers/spi/xilinx_spi.c
index 8f0f32f..cc5ac51 100644
--- a/drivers/spi/xilinx_spi.c
+++ b/drivers/spi/xilinx_spi.c
@@ -77,10 +77,6 @@
 #define CONFIG_XILINX_SPI_IDLE_VAL     GENMASK(7, 0)
 #endif

-#ifndef CONFIG_SYS_XILINX_SPI_LIST
-#define CONFIG_SYS_XILINX_SPI_LIST     { CONFIG_SYS_SPI_BASE }
-#endif
-
 /* xilinx spi register set */
 struct xilinx_spi_regs {
        u32 __space0__[7];
@@ -107,13 +103,12 @@ struct xilinx_spi_priv {
        unsigned int mode;
 };

-static unsigned long xilinx_spi_base_list[] = CONFIG_SYS_XILINX_SPI_LIST;
 static int xilinx_spi_probe(struct udevice *bus)
 {
        struct xilinx_spi_priv *priv = dev_get_priv(bus);
        struct xilinx_spi_regs *regs = priv->regs;

-       priv->regs = (struct xilinx_spi_regs *)xilinx_spi_base_list[bus->seq];
+       priv->regs = (struct xilinx_spi_regs *)devfdt_get_addr(bus);

        writel(SPISSR_RESET_VALUE, &regs->srr);

--
2.7.4

This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.

  reply	other threads:[~2018-06-21  9:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-21  9:23 [U-Boot] [UBOOT PATCH v3 0/3] spi:xilinx_spi: Modify xilinx spi driver Vipul Kumar
2018-06-21  9:23 ` Vipul Kumar [this message]
2018-06-25 10:07   ` [U-Boot] [UBOOT PATCH v3 1/3] spi: xilinx: Read reg base address from DTS file Jagan Teki
2018-06-21  9:23 ` [U-Boot] [UBOOT PATCH v3 2/3] spi: xilinx_spi: Modify transfer logic xilinx_spi_xfer() function Vipul Kumar
2018-06-25 10:11   ` Jagan Teki
2018-06-21  9:23 ` [U-Boot] [UBOOT PATCH v3 3/3] spi: xilinx_spi: Added support to read JEDEC-id twice at the boot time Vipul Kumar
2018-06-25 10:17   ` Jagan Teki
2018-06-25 10:36     ` Vipul Kumar
2018-06-27  6:43       ` Jagan Teki
2018-06-27  7:29         ` Michal Simek
2018-06-27  7:35           ` Jagan Teki
2018-06-27  9:47             ` Michal Simek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1529572997-5995-2-git-send-email-vipul.kumar@xilinx.com \
    --to=vipul.kumar@xilinx.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.