mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 13:44:15 +08:00
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 -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEhb3UXAyxp6UQ0v6khtxQDvusFVQFAl7IYJUACgkQhtxQDvus FVQS3Q//dkeRknH/s3oJT4X/RQjOLiWl+NjHb4Wmmn/y7qVOz0VsVnihg12546FH sU4fu9hv1md1KiL0I2K7booWNnnaoysqrylBGpU6K2UBj2V1WEU9luXWXrzcjLwM 7nrgBQJ+b/eWoWXmIra5FqItpE1OfMZ84JF0IdXnfHxnCC3STozeXslfh6h70fdq OpJzC+GgO9J1I+n2TunbEdWWXo5yzJ4GaQl2+LrV/nMjfApYqVt9qnxEbpJPRntS nIAPxqXjc0VKXnA+2d52W2vwXwaWP4YoJ3DsxFLCf55Ux1JBi9XLfflJ9LaQZoJC LLTj4wf5XTOtKBn+K4ERAHHJoeXL8fo2ShoGlkNpmbTTyPXP4cDFabK4UBoyCPxf BcJlrUEac4O/n+2VvCD9Dj1qQzveNl837muXGNXoq/6M1Hvni6ki2Ij1RA7vh2Kp maRv+0dvZ8GLOXqh4veRzJ19cYkqPkrUaf11I7Mm1voFHC7jGYDuyJh6jQLyp1JG 1TbiDBXSXA5frb6SNSmS7I9ROKdKcOfa2i4mpatrm22wdpcM8HobgDuTtVaOnNCt RjuBRiO9nYsHKirsDNGmXtPPrI1mp2qjls0n1ru5I9jI2WaJ7aZjRMwTsVRvjLpe TZtOmiXCD0rg+RDMldP/KFnj6TQtM9NdiXTNIZCE3L41ut6s97w= =Y7QG -----END PGP SIGNATURE----- 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: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
fb6c05b08b
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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++)
|
||||
/*
|
||||
|
@ -519,7 +519,7 @@ int ucc_set_tdm_rxtx_clk(u32 tdm_num, enum qe_clock clock,
|
||||
int clock_bits;
|
||||
u32 shift;
|
||||
struct qe_mux __iomem *qe_mux_reg;
|
||||
__be32 __iomem *cmxs1cr;
|
||||
__be32 __iomem *cmxs1cr;
|
||||
|
||||
qe_mux_reg = &qe_immr->qmx;
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
*/
|
||||
struct bcom_bd {
|
||||
u32 status;
|
||||
u32 data[0]; /* variable payload size */
|
||||
u32 data[]; /* variable payload size */
|
||||
};
|
||||
|
||||
/* ======================================================================== */
|
||||
|
@ -307,7 +307,7 @@ struct qe_firmware {
|
||||
u8 revision; /* The microcode version revision */
|
||||
u8 padding; /* Reserved, for alignment */
|
||||
u8 reserved[4]; /* Reserved, for future expansion */
|
||||
} __attribute__ ((packed)) microcode[1];
|
||||
} __packed microcode[];
|
||||
/* All microcode binaries should be located here */
|
||||
/* CRC32 should be located here, after the microcode binaries */
|
||||
} __attribute__ ((packed));
|
||||
|
Loading…
Reference in New Issue
Block a user