History

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

Arnd Bergmann committed 6 years ago

Commit fb6c05b2 parents 60b4000 e9e4ef97 files · +10 −23Browse files

Unified · Split

7 files
  1. drivers/soc/fsl/dpio/dpio-service.c +5 −1
  2. drivers/soc/fsl/dpio/qbman-portal.c +0 −12
  3. drivers/soc/fsl/qbman/qman.c +0 −5
  4. drivers/soc/fsl/qe/qe.c +2 −2
  5. drivers/soc/fsl/qe/ucc.c +1 −1
  6. include/linux/fsl/bestcomm/bestcomm.h +1 −1
  7. include/soc/fsl/qe/qe.h +1 −1
drivers/soc/fsl/dpio/dpio-service.c+5−1
@@ -58,7 +58,7 @@ static inline struct dpaa2_io *service_select_by_cpu(struct dpaa2_io *d, · 57 unmodified lines
5858 * If cpu == -1, choose the current cpu, with no guarantees about
5959 * potentially being migrated away.
6060 */
61− if (unlikely(cpu < 0))
61+ if (cpu < 0)
6262 cpu = smp_processor_id();
6363
6464 /* 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) · 5 unmodified lines
7070 if (d)
7171 return d;
7272
73+ d = service_select_by_cpu(d, -1);
74+ if (d)
75+ return d;
76+
7377 spin_lock(&dpio_list_lock);
7478 d = list_entry(dpio_list.next, struct dpaa2_io, node);
7579 list_del(&d->node);
drivers/soc/fsl/dpio/qbman-portal.c+0−12
@@ -572,18 +572,6 @@ void qbman_eq_desc_set_qd(struct qbman_eq_desc *d, u32 qdid, · 571 unmodified lines
572572 #define EQAR_VB(eqar) ((eqar) & 0x80)
573573 #define EQAR_SUCCESS(eqar) ((eqar) & 0x100)
574574
575−static inline void qbman_write_eqcr_am_rt_register(struct qbman_swp *p,
576− u8 idx)
577−{
578− if (idx < 16)
579− qbman_write_register(p, QBMAN_CINH_SWP_EQCR_AM_RT + idx * 4,
580− QMAN_RT_MODE);
581− else
582− qbman_write_register(p, QBMAN_CINH_SWP_EQCR_AM_RT2 +
583− (idx - 16) * 4,
584− QMAN_RT_MODE);
585−}
586−
587575 #define QB_RT_BIT ((u32)0x100)
588576 /**
589577 * qbman_swp_enqueue_direct() - Issue an enqueue command
drivers/soc/fsl/qbman/qman.c+0−5
@@ -449,11 +449,6 @@ static inline int qm_eqcr_init(struct qm_portal *portal, · 448 unmodified lines
449449 return 0;
450450 }
451451
452−static inline unsigned int qm_eqcr_get_ci_stashing(struct qm_portal *portal)
453−{
454− return (qm_in(portal, QM_REG_CFG) >> 28) & 0x7;
455−}
456−
457452 static inline void qm_eqcr_finish(struct qm_portal *portal)
458453 {
459454 struct qm_eqcr *eqcr = &portal->eqcr;
drivers/soc/fsl/qe/qe.c+2−2
@@ -448,7 +448,7 @@ int qe_upload_firmware(const struct qe_firmware *firmware) · 447 unmodified lines
448448 unsigned int i;
449449 unsigned int j;
450450 u32 crc;
451− size_t calc_size = sizeof(struct qe_firmware);
451+ size_t calc_size;
452452 size_t length;
453453 const struct qe_header *hdr;
454454
@@ -480,7 +480,7 @@ int qe_upload_firmware(const struct qe_firmware *firmware) · 25 unmodified lines
480480 }
481481
482482 /* Validate the length and check if there's a CRC */
483− calc_size += (firmware->count - 1) * sizeof(struct qe_microcode);
483+ calc_size = struct_size(firmware, microcode, firmware->count);
484484
485485 for (i = 0; i < firmware->count; i++)
486486 /*
drivers/soc/fsl/qe/ucc.c+1−1
@@ -519,7 +519,7 @@ int ucc_set_tdm_rxtx_clk(u32 tdm_num, enum qe_clock clock, · 518 unmodified lines
519519 int clock_bits;
520520 u32 shift;
521521 struct qe_mux __iomem *qe_mux_reg;
522− __be32 __iomem *cmxs1cr;
522+ __be32 __iomem *cmxs1cr;
523523
524524 qe_mux_reg = &qe_immr->qmx;
525525
include/linux/fsl/bestcomm/bestcomm.h+1−1
@@ -27,7 +27,7 @@ · 26 unmodified lines
2727 */
2828 struct bcom_bd {
2929 u32 status;
30− u32 data[0]; /* variable payload size */
30+ u32 data[]; /* variable payload size */
3131 };
3232
3333 /* ======================================================================== */
include/soc/fsl/qe/qe.h+1−1
@@ -307,7 +307,7 @@ struct qe_firmware { · 306 unmodified lines
307307 u8 revision; /* The microcode version revision */
308308 u8 padding; /* Reserved, for alignment */
309309 u8 reserved[4]; /* Reserved, for future expansion */
310− } __attribute__ ((packed)) microcode[1];
310+ } __packed microcode[];
311311 /* All microcode binaries should be located here */
312312 /* CRC32 should be located here, after the microcode binaries */
313313 } __attribute__ ((packed));