All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alison Wang <b18965@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 6/9] ls102xa: qixis: Add CONFIG_QIXIS_I2C_ACCESS macro
Date: Wed, 3 Dec 2014 15:00:46 +0800	[thread overview]
Message-ID: <1417590049-500-7-git-send-email-b18965@freescale.com> (raw)
In-Reply-To: <1417590049-500-1-git-send-email-b18965@freescale.com>

Through adding CONFIG_QIXIS_I2C_ACCESS macro,
QIXIS_READ(reg)/QIXIS_WRITE(reg, value) can be used
for both i2c and ifc access to QIXIS FPGA. This is
more convenient for coding.

Signed-off-by: Jason Jin <jason.jin@freescale.com>
Signed-off-by: Alison Wang <alison.wang@freescale.com>
---
Change log: 
 v4: No change.
 v3: No change.
 v2: No change.

 board/freescale/common/qixis.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/board/freescale/common/qixis.h b/board/freescale/common/qixis.h
index d8fed14..52d2021 100644
--- a/board/freescale/common/qixis.h
+++ b/board/freescale/common/qixis.h
@@ -100,8 +100,15 @@ u8 qixis_read_i2c(unsigned int reg);
 void qixis_write_i2c(unsigned int reg, u8 value);
 #endif
 
+#if defined(CONFIG_QIXIS_I2C_ACCESS) && defined(CONFIG_SYS_I2C_FPGA_ADDR)
+#define QIXIS_READ(reg) qixis_read_i2c(offsetof(struct qixis, reg))
+#define QIXIS_WRITE(reg, value) \
+	qixis_write_i2c(offsetof(struct qixis, reg), value)
+#else
 #define QIXIS_READ(reg) qixis_read(offsetof(struct qixis, reg))
 #define QIXIS_WRITE(reg, value) qixis_write(offsetof(struct qixis, reg), value)
+#endif
+
 #ifdef CONFIG_SYS_I2C_FPGA_ADDR
 #define QIXIS_READ_I2C(reg) qixis_read_i2c(offsetof(struct qixis, reg))
 #define QIXIS_WRITE_I2C(reg, value) \
-- 
2.1.0.27.g96db324

  parent reply	other threads:[~2014-12-03  7:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-03  7:00 [U-Boot] [PATCH v4 0/9] Add SD/NAND boot support for LS1021AQDS/TWR board Alison Wang
2014-12-03  7:00 ` [U-Boot] [PATCH v4 1/9] ls102xa: pblimage: Add pblimage tool support for LS102xA Alison Wang
2014-12-11 19:01   ` York Sun
2014-12-03  7:00 ` [U-Boot] [PATCH v4 2/9] spl: Use u-boot.img instead of u-boot.bin Alison Wang
2014-12-11 19:01   ` York Sun
2014-12-03  7:00 ` [U-Boot] [PATCH v4 3/9] arm: spl: Add I2C linker list in generic .lds Alison Wang
2014-12-11 19:02   ` York Sun
2014-12-03  7:00 ` [U-Boot] [PATCH v4 4/9] common: spl: Add interactive DDR debugger support for SPL image Alison Wang
2014-12-05 16:40   ` York Sun
2014-12-03  7:00 ` [U-Boot] [PATCH v4 5/9] kconfig: ls1021a: add SUPPORT_SPL Alison Wang
2014-12-03  7:30   ` Masahiro Yamada
2014-12-03  7:53     ` Huan Wang
2014-12-11 19:02   ` York Sun
2014-12-03  7:00 ` Alison Wang [this message]
2014-12-11 19:03   ` [U-Boot] [PATCH v4 6/9] ls102xa: qixis: Add CONFIG_QIXIS_I2C_ACCESS macro York Sun
2014-12-03  7:00 ` [U-Boot] [PATCH v4 7/9] arm: ls102xa: Add SD boot support for LS1021AQDS board Alison Wang
2014-12-11 19:03   ` York Sun
2014-12-03  7:00 ` [U-Boot] [PATCH v4 8/9] arm: ls102xa: Add SD boot support for LS1021ATWR board Alison Wang
2014-12-11 19:04   ` York Sun
2014-12-03  7:00 ` [U-Boot] [PATCH v4 9/9] arm: ls102xa: Add NAND boot support for LS1021AQDS board Alison Wang
2014-12-05 18:10   ` York Sun

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=1417590049-500-7-git-send-email-b18965@freescale.com \
    --to=b18965@freescale.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.