Commit fb6c05b0 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'soc-fsl-next-v5.8' of...

Merge tag 'soc-fsl-next-v5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux into arm/drivers

NXP/FSL SoC driver updates for v5.8

DPAA2 DPIO driver
- Prefer the CPU affined DPIO

QUICC Engine drivers
- Replace one-element array and use struct_size() helper

Cleanups in various drivers

* tag 'soc-fsl-next-v5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux:
  soc: fsl: dpio: Remove unused inline function qbman_write_eqcr_am_rt_register
  soc: fsl: qe: clean up an indentation issue
  soc: fsl: dpio: Prefer the CPU affine DPIO
  soc: fsl: qbman: Remove unused inline function qm_eqcr_get_ci_stashing
  soc: fsl: qe: Replace one-element array and use struct_size() helper
  treewide: Replace zero-length array with flexible-array

Link: https://lore.kernel.org/r/20200527215740.9279-1-leoyang.li@nxp.com


Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents 60b4000f e9e4ef91
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ static inline struct dpaa2_io *service_select_by_cpu(struct dpaa2_io *d,
	 * If cpu == -1, choose the current cpu, with no guarantees about
	 * potentially being migrated away.
	 */
	if (unlikely(cpu < 0))
	if (cpu < 0)
		cpu = smp_processor_id();

	/* If a specific cpu was requested, pick it up immediately */
@@ -70,6 +70,10 @@ static inline struct dpaa2_io *service_select(struct dpaa2_io *d)
	if (d)
		return d;

	d = service_select_by_cpu(d, -1);
	if (d)
		return d;

	spin_lock(&dpio_list_lock);
	d = list_entry(dpio_list.next, struct dpaa2_io, node);
	list_del(&d->node);
+0 −12
Original line number Diff line number Diff line
@@ -572,18 +572,6 @@ void qbman_eq_desc_set_qd(struct qbman_eq_desc *d, u32 qdid,
#define EQAR_VB(eqar)      ((eqar) & 0x80)
#define EQAR_SUCCESS(eqar) ((eqar) & 0x100)

static inline void qbman_write_eqcr_am_rt_register(struct qbman_swp *p,
						   u8 idx)
{
	if (idx < 16)
		qbman_write_register(p, QBMAN_CINH_SWP_EQCR_AM_RT + idx * 4,
				     QMAN_RT_MODE);
	else
		qbman_write_register(p, QBMAN_CINH_SWP_EQCR_AM_RT2 +
				     (idx - 16) * 4,
				     QMAN_RT_MODE);
}

#define QB_RT_BIT ((u32)0x100)
/**
 * qbman_swp_enqueue_direct() - Issue an enqueue command
+0 −5
Original line number Diff line number Diff line
@@ -449,11 +449,6 @@ static inline int qm_eqcr_init(struct qm_portal *portal,
	return 0;
}

static inline unsigned int qm_eqcr_get_ci_stashing(struct qm_portal *portal)
{
	return (qm_in(portal, QM_REG_CFG) >> 28) & 0x7;
}

static inline void qm_eqcr_finish(struct qm_portal *portal)
{
	struct qm_eqcr *eqcr = &portal->eqcr;
+2 −2
Original line number Diff line number Diff line
@@ -448,7 +448,7 @@ int qe_upload_firmware(const struct qe_firmware *firmware)
	unsigned int i;
	unsigned int j;
	u32 crc;
	size_t calc_size = sizeof(struct qe_firmware);
	size_t calc_size;
	size_t length;
	const struct qe_header *hdr;

@@ -480,7 +480,7 @@ int qe_upload_firmware(const struct qe_firmware *firmware)
	}

	/* Validate the length and check if there's a CRC */
	calc_size += (firmware->count - 1) * sizeof(struct qe_microcode);
	calc_size = struct_size(firmware, microcode, firmware->count);

	for (i = 0; i < firmware->count; i++)
		/*
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@
 */
struct bcom_bd {
	u32	status;
	u32	data[0];	/* variable payload size */
	u32	data[];	/* variable payload size */
};

/* ======================================================================== */
Loading