fman.c (c95baf12f5077419db01313ab61c2aac007d40cd) | fman.c (b281f7b93b258ce1419043bbd898a29254d5c9c7) |
---|---|
1/* 2 * Copyright 2008-2015 Freescale Semiconductor Inc. | 1/* 2 * Copyright 2008-2015 Freescale Semiconductor Inc. |
3 * Copyright 2020 NXP |
|
3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are met: 6 * * Redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer. 8 * * Redistributions in binary form must reproduce the above copyright 9 * notice, this list of conditions and the following disclaimer in the 10 * documentation and/or other materials provided with the distribution. --- 550 unchanged lines hidden (view full) --- 561 u16 clk_freq; 562 u32 cam_base_addr; 563 u32 fifo_base_addr; 564 u32 total_fifo_size; 565 u32 total_num_of_tasks; 566 u32 qmi_def_tnums_thresh; 567}; 568 | 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are met: 7 * * Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. 9 * * Redistributions in binary form must reproduce the above copyright 10 * notice, this list of conditions and the following disclaimer in the 11 * documentation and/or other materials provided with the distribution. --- 550 unchanged lines hidden (view full) --- 562 u16 clk_freq; 563 u32 cam_base_addr; 564 u32 fifo_base_addr; 565 u32 total_fifo_size; 566 u32 total_num_of_tasks; 567 u32 qmi_def_tnums_thresh; 568}; 569 |
570#ifdef CONFIG_DPAA_ERRATUM_A050385 571static bool fman_has_err_a050385; 572#endif 573 |
|
569static irqreturn_t fman_exceptions(struct fman *fman, 570 enum fman_exceptions exception) 571{ 572 dev_dbg(fman->dev, "%s: FMan[%d] exception %d\n", 573 __func__, fman->state->fm_id, exception); 574 575 return IRQ_HANDLED; 576} --- 1936 unchanged lines hidden (view full) --- 2513 * Return: A pointer to the FMan device 2514 */ 2515struct fman *fman_bind(struct device *fm_dev) 2516{ 2517 return (struct fman *)(dev_get_drvdata(get_device(fm_dev))); 2518} 2519EXPORT_SYMBOL(fman_bind); 2520 | 574static irqreturn_t fman_exceptions(struct fman *fman, 575 enum fman_exceptions exception) 576{ 577 dev_dbg(fman->dev, "%s: FMan[%d] exception %d\n", 578 __func__, fman->state->fm_id, exception); 579 580 return IRQ_HANDLED; 581} --- 1936 unchanged lines hidden (view full) --- 2518 * Return: A pointer to the FMan device 2519 */ 2520struct fman *fman_bind(struct device *fm_dev) 2521{ 2522 return (struct fman *)(dev_get_drvdata(get_device(fm_dev))); 2523} 2524EXPORT_SYMBOL(fman_bind); 2525 |
2526#ifdef CONFIG_DPAA_ERRATUM_A050385 2527bool fman_has_errata_a050385(void) 2528{ 2529 return fman_has_err_a050385; 2530} 2531EXPORT_SYMBOL(fman_has_errata_a050385); 2532#endif 2533 |
|
2521static irqreturn_t fman_err_irq(int irq, void *handle) 2522{ 2523 struct fman *fman = (struct fman *)handle; 2524 u32 pending; 2525 struct fman_fpm_regs __iomem *fpm_rg; 2526 irqreturn_t single_ret, ret = IRQ_NONE; 2527 2528 if (!is_init_done(fman->cfg)) --- 311 unchanged lines hidden (view full) --- 2840 2841 err = of_platform_populate(fm_node, NULL, NULL, &of_dev->dev); 2842 if (err) { 2843 dev_err(&of_dev->dev, "%s: of_platform_populate() failed\n", 2844 __func__); 2845 goto fman_free; 2846 } 2847 | 2534static irqreturn_t fman_err_irq(int irq, void *handle) 2535{ 2536 struct fman *fman = (struct fman *)handle; 2537 u32 pending; 2538 struct fman_fpm_regs __iomem *fpm_rg; 2539 irqreturn_t single_ret, ret = IRQ_NONE; 2540 2541 if (!is_init_done(fman->cfg)) --- 311 unchanged lines hidden (view full) --- 2853 2854 err = of_platform_populate(fm_node, NULL, NULL, &of_dev->dev); 2855 if (err) { 2856 dev_err(&of_dev->dev, "%s: of_platform_populate() failed\n", 2857 __func__); 2858 goto fman_free; 2859 } 2860 |
2861#ifdef CONFIG_DPAA_ERRATUM_A050385 2862 fman_has_err_a050385 = 2863 of_property_read_bool(fm_node, "fsl,erratum-a050385"); 2864#endif 2865 |
|
2848 return fman; 2849 2850fman_node_put: 2851 of_node_put(fm_node); 2852fman_free: 2853 kfree(fman); 2854 return NULL; 2855} --- 89 unchanged lines hidden --- | 2866 return fman; 2867 2868fman_node_put: 2869 of_node_put(fm_node); 2870fman_free: 2871 kfree(fman); 2872 return NULL; 2873} --- 89 unchanged lines hidden --- |