Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5a42f1ec authored by Claudiu Manoil's avatar Claudiu Manoil Committed by Scott Wood
Browse files

soc/qbman: Handle endianness of qm/bm_in/out()

parent b5399452
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -167,12 +167,12 @@ struct bm_portal {
/* Cache-inhibited register access. */
/* Cache-inhibited register access. */
static inline u32 bm_in(struct bm_portal *p, u32 offset)
static inline u32 bm_in(struct bm_portal *p, u32 offset)
{
{
	return __raw_readl(p->addr.ci + offset);
	return be32_to_cpu(__raw_readl(p->addr.ci + offset));
}
}


static inline void bm_out(struct bm_portal *p, u32 offset, u32 val)
static inline void bm_out(struct bm_portal *p, u32 offset, u32 val)
{
{
	__raw_writel(val, p->addr.ci + offset);
	__raw_writel(cpu_to_be32(val), p->addr.ci + offset);
}
}


/* Cache Enabled Portal Access */
/* Cache Enabled Portal Access */
@@ -188,7 +188,7 @@ static inline void bm_cl_touch_ro(struct bm_portal *p, u32 offset)


static inline u32 bm_ce_in(struct bm_portal *p, u32 offset)
static inline u32 bm_ce_in(struct bm_portal *p, u32 offset)
{
{
	return __raw_readl(p->addr.ce + offset);
	return be32_to_cpu(__raw_readl(p->addr.ce + offset));
}
}


struct bman_portal {
struct bman_portal {
+3 −3
Original line number Original line Diff line number Diff line
@@ -321,12 +321,12 @@ struct qm_portal {
/* Cache-inhibited register access. */
/* Cache-inhibited register access. */
static inline u32 qm_in(struct qm_portal *p, u32 offset)
static inline u32 qm_in(struct qm_portal *p, u32 offset)
{
{
	return __raw_readl(p->addr.ci + offset);
	return be32_to_cpu(__raw_readl(p->addr.ci + offset));
}
}


static inline void qm_out(struct qm_portal *p, u32 offset, u32 val)
static inline void qm_out(struct qm_portal *p, u32 offset, u32 val)
{
{
	__raw_writel(val, p->addr.ci + offset);
	__raw_writel(cpu_to_be32(val), p->addr.ci + offset);
}
}


/* Cache Enabled Portal Access */
/* Cache Enabled Portal Access */
@@ -342,7 +342,7 @@ static inline void qm_cl_touch_ro(struct qm_portal *p, u32 offset)


static inline u32 qm_ce_in(struct qm_portal *p, u32 offset)
static inline u32 qm_ce_in(struct qm_portal *p, u32 offset)
{
{
	return __raw_readl(p->addr.ce + offset);
	return be32_to_cpu(__raw_readl(p->addr.ce + offset));
}
}


/* --- EQCR API --- */
/* --- EQCR API --- */