hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/drivers/net/ethernet/freescale/fman/fman.c
....@@ -639,6 +639,9 @@
639639 {
640640 u32 tmp;
641641
642
+ iowrite32be(liodn_ofst, &fman->bmi_regs->fmbm_spliodn[port_id - 1]);
643
+ if (!IS_ENABLED(CONFIG_FSL_PAMU))
644
+ return;
642645 /* set LIODN base for this port */
643646 tmp = ioread32be(&fman->dma_regs->fmdmplr[port_id / 2]);
644647 if (port_id % 2) {
....@@ -649,7 +652,6 @@
649652 tmp |= liodn_base << DMA_LIODN_SHIFT;
650653 }
651654 iowrite32be(tmp, &fman->dma_regs->fmdmplr[port_id / 2]);
652
- iowrite32be(liodn_ofst, &fman->bmi_regs->fmbm_spliodn[port_id - 1]);
653655 }
654656
655657 static void enable_rams_ecc(struct fman_fpm_regs __iomem *fpm_rg)
....@@ -1946,6 +1948,8 @@
19461948
19471949 fman->liodn_offset[i] =
19481950 ioread32be(&fman->bmi_regs->fmbm_spliodn[i - 1]);
1951
+ if (!IS_ENABLED(CONFIG_FSL_PAMU))
1952
+ continue;
19491953 liodn_base = ioread32be(&fman->dma_regs->fmdmplr[i / 2]);
19501954 if (i % 2) {
19511955 /* FMDM_PLR LSB holds LIODN base for odd ports */
....@@ -2059,11 +2063,11 @@
20592063 /**
20602064 * fman_register_intr
20612065 * @fman: A Pointer to FMan device
2062
- * @mod: Calling module
2066
+ * @module: Calling module
20632067 * @mod_id: Module id (if more than 1 exists, '0' if not)
20642068 * @intr_type: Interrupt type (error/normal) selection.
2065
- * @f_isr: The interrupt service routine.
2066
- * @h_src_arg: Argument to be passed to f_isr.
2069
+ * @isr_cb: The interrupt service routine.
2070
+ * @src_arg: Argument to be passed to isr_cb.
20672071 *
20682072 * Used to register an event handler to be processed by FMan
20692073 *
....@@ -2087,7 +2091,7 @@
20872091 /**
20882092 * fman_unregister_intr
20892093 * @fman: A Pointer to FMan device
2090
- * @mod: Calling module
2094
+ * @module: Calling module
20912095 * @mod_id: Module id (if more than 1 exists, '0' if not)
20922096 * @intr_type: Interrupt type (error/normal) selection.
20932097 *
....@@ -2338,8 +2342,8 @@
23382342
23392343 /**
23402344 * fman_get_revision
2341
- * @fman - Pointer to the FMan module
2342
- * @rev_info - A structure of revision information parameters.
2345
+ * @fman: - Pointer to the FMan module
2346
+ * @rev_info: - A structure of revision information parameters.
23432347 *
23442348 * Returns the FM revision
23452349 *
....@@ -2443,9 +2447,6 @@
24432447 * buffers when not using jumbo frames.
24442448 * Must be large enough to accommodate the network MTU, but small enough
24452449 * to avoid wasting skb memory.
2446
- *
2447
- * Could be overridden once, at boot-time, via the
2448
- * fm_set_max_frm() callback.
24492450 */
24502451 static int fsl_fm_max_frm = FSL_FM_MAX_FRAME_SIZE;
24512452 module_param(fsl_fm_max_frm, int, 0);
....@@ -2507,7 +2508,7 @@
25072508
25082509 /**
25092510 * fman_bind
2510
- * @dev: FMan OF device pointer
2511
+ * @fm_dev: FMan OF device pointer
25112512 *
25122513 * Bind to a specific FMan device.
25132514 *