mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 3/5] include/soc/fsl: Make struct ccsr_qman v3 specific
Date: Fri, 10 Jan 2020 12:54:08 +0100	[thread overview]
Message-ID: <20200110115410.18265-4-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20200110115410.18265-1-s.hauer@pengutronix.de>

struct ccsr_qman is ifdeffed for different versions of this structure.
CONFIG_SYS_FSL_QMAN_V3 is not defined which means we happen to use
the wrong version on LS1046a. Hardcode it to the v3 version to make
it work on LS1046a and rename it to ccsr_qman_v3 to make it obvious
that it needs a change on non v3 versions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/mach-layerscape/icid.c |  2 +-
 include/soc/fsl/fsl_qbman.h     | 13 +------------
 2 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/arch/arm/mach-layerscape/icid.c b/arch/arm/mach-layerscape/icid.c
index 340ca959ca..62c2d356e2 100644
--- a/arch/arm/mach-layerscape/icid.c
+++ b/arch/arm/mach-layerscape/icid.c
@@ -83,7 +83,7 @@ struct icid_id_table icid_tbl_ls1046a[] = {
 		.id = DPAA1_SID_START,
 		.reg = DPAA1_SID_START,
 		.compat_addr = LSCH2_QMAN_ADDR,
-		.reg_addr = offsetof(struct ccsr_qman, liodnr) + LSCH2_QMAN_ADDR,
+		.reg_addr = offsetof(struct ccsr_qman_v3, liodnr) + LSCH2_QMAN_ADDR,
 	}, {
 		.compat = "fsl,bman",
 		.id = DPAA1_SID_START + 1,
diff --git a/include/soc/fsl/fsl_qbman.h b/include/soc/fsl/fsl_qbman.h
index 10cbb16833..1caaf4808d 100644
--- a/include/soc/fsl/fsl_qbman.h
+++ b/include/soc/fsl/fsl_qbman.h
@@ -6,17 +6,8 @@
 #ifndef __FSL_QBMAN_H__
 #define __FSL_QBMAN_H__
 
-struct ccsr_qman {
-#ifdef CONFIG_SYS_FSL_QMAN_V3
+struct ccsr_qman_v3 {
 	u8	res0[0x200];
-#else
-	struct {
-		u32	qcsp_lio_cfg;	/* 0x0 - SW Portal n LIO cfg */
-		u32	qcsp_io_cfg;	/* 0x4 - SW Portal n IO cfg */
-		u32	res;
-		u32	qcsp_dd_cfg;	/* 0xc - SW Portal Dynamic Debug cfg */
-	} qcsp[32];
-#endif
 	/* Not actually reserved, but irrelevant to u-boot */
 	u8	res[0xbf8 - 0x200];
 	u32	ip_rev_1;
@@ -41,14 +32,12 @@ struct ccsr_qman {
 	u32	ci_rlm_cfg;	/* Initiator Read Latency Monitor Cfg */
 	u32	ci_rlm_avg;	/* Initiator Read Latency Monitor Avg */
 	u8	res7[0x2e8];
-#ifdef CONFIG_SYS_FSL_QMAN_V3
 	struct {
 		u32	qcsp_lio_cfg;	/* 0x0 - SW Portal n LIO cfg */
 		u32	qcsp_io_cfg;	/* 0x4 - SW Portal n IO cfg */
 		u32	res;
 		u32	qcsp_dd_cfg;	/* 0xc - SW Portal n Dynamic Debug cfg*/
 	} qcsp[50];
-#endif
 };
 
 struct ccsr_bman {
-- 
2.25.0.rc1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2020-01-10 11:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-10 11:54 [PATCH 0/5] ARM: Layerscape: Add Fixups for Linux IOMMU support Sascha Hauer
2020-01-10 11:54 ` [PATCH 1/5] ARM: Layerscape: replace overcomplicated macros Sascha Hauer
2020-01-10 11:54 ` [PATCH 2/5] include/soc/fsl: remove unused function prototypes Sascha Hauer
2020-01-10 11:54 ` Sascha Hauer [this message]
2020-01-10 11:54 ` [PATCH 4/5] net: fsl-fman: Do not put hardware in reset before Linux start Sascha Hauer
2020-01-10 11:54 ` [PATCH 5/5] ARM: Layerscape: setup icids for the IOMMU Sascha Hauer

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=20200110115410.18265-4-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox