~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/acpi_dma.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/linux/acpi_dma.h (Version linux-6.11-rc3) and /include/linux/acpi_dma.h (Version linux-4.19.319)


  1 /* SPDX-License-Identifier: GPL-2.0-only */    << 
  2 /*                                                  1 /*
  3  * ACPI helpers for DMA request / controller        2  * ACPI helpers for DMA request / controller
  4  *                                                  3  *
  5  * Based on of_dma.h                                4  * Based on of_dma.h
  6  *                                                  5  *
  7  * Copyright (C) 2013, Intel Corporation            6  * Copyright (C) 2013, Intel Corporation
  8  * Author: Andy Shevchenko <andriy.shevchenko@      7  * Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
                                                   >>   8  *
                                                   >>   9  * This program is free software; you can redistribute it and/or modify
                                                   >>  10  * it under the terms of the GNU General Public License version 2 as
                                                   >>  11  * published by the Free Software Foundation.
  9  */                                                12  */
 10                                                    13 
 11 #ifndef __LINUX_ACPI_DMA_H                         14 #ifndef __LINUX_ACPI_DMA_H
 12 #define __LINUX_ACPI_DMA_H                         15 #define __LINUX_ACPI_DMA_H
 13                                                    16 
 14 #include <linux/list.h>                            17 #include <linux/list.h>
 15 #include <linux/device.h>                          18 #include <linux/device.h>
 16 #include <linux/err.h>                             19 #include <linux/err.h>
 17 #include <linux/dmaengine.h>                       20 #include <linux/dmaengine.h>
 18                                                    21 
 19 /**                                                22 /**
 20  * struct acpi_dma_spec - slave device DMA res     23  * struct acpi_dma_spec - slave device DMA resources
 21  * @chan_id:    channel unique id                  24  * @chan_id:    channel unique id
 22  * @slave_id:   request line unique id             25  * @slave_id:   request line unique id
 23  * @dev:        struct device of the DMA contr     26  * @dev:        struct device of the DMA controller to be used in the filter
 24  *              function                           27  *              function
 25  */                                                28  */
 26 struct acpi_dma_spec {                             29 struct acpi_dma_spec {
 27         int             chan_id;                   30         int             chan_id;
 28         int             slave_id;                  31         int             slave_id;
 29         struct device   *dev;                      32         struct device   *dev;
 30 };                                                 33 };
 31                                                    34 
 32 /**                                                35 /**
 33  * struct acpi_dma - representation of the reg     36  * struct acpi_dma - representation of the registered DMAC
 34  * @dma_controllers:    linked list node           37  * @dma_controllers:    linked list node
 35  * @dev:                struct device of this      38  * @dev:                struct device of this controller
 36  * @acpi_dma_xlate:     callback function to f     39  * @acpi_dma_xlate:     callback function to find a suitable channel
 37  * @data:               private data used by a     40  * @data:               private data used by a callback function
 38  * @base_request_line:  first supported reques     41  * @base_request_line:  first supported request line (CSRT)
 39  * @end_request_line:   last supported request     42  * @end_request_line:   last supported request line (CSRT)
 40  */                                                43  */
 41 struct acpi_dma {                                  44 struct acpi_dma {
 42         struct list_head        dma_controller     45         struct list_head        dma_controllers;
 43         struct device           *dev;              46         struct device           *dev;
 44         struct dma_chan         *(*acpi_dma_xl     47         struct dma_chan         *(*acpi_dma_xlate)
 45                                 (struct acpi_d     48                                 (struct acpi_dma_spec *, struct acpi_dma *);
 46         void                    *data;             49         void                    *data;
 47         unsigned short          base_request_l     50         unsigned short          base_request_line;
 48         unsigned short          end_request_li     51         unsigned short          end_request_line;
 49 };                                                 52 };
 50                                                    53 
 51 /* Used with acpi_dma_simple_xlate() */            54 /* Used with acpi_dma_simple_xlate() */
 52 struct acpi_dma_filter_info {                      55 struct acpi_dma_filter_info {
 53         dma_cap_mask_t  dma_cap;                   56         dma_cap_mask_t  dma_cap;
 54         dma_filter_fn   filter_fn;                 57         dma_filter_fn   filter_fn;
 55 };                                                 58 };
 56                                                    59 
 57 #ifdef CONFIG_DMA_ACPI                             60 #ifdef CONFIG_DMA_ACPI
 58                                                    61 
 59 int acpi_dma_controller_register(struct device     62 int acpi_dma_controller_register(struct device *dev,
 60                 struct dma_chan *(*acpi_dma_xl     63                 struct dma_chan *(*acpi_dma_xlate)
 61                 (struct acpi_dma_spec *, struc     64                 (struct acpi_dma_spec *, struct acpi_dma *),
 62                 void *data);                       65                 void *data);
 63 int acpi_dma_controller_free(struct device *de     66 int acpi_dma_controller_free(struct device *dev);
 64 int devm_acpi_dma_controller_register(struct d     67 int devm_acpi_dma_controller_register(struct device *dev,
 65                 struct dma_chan *(*acpi_dma_xl     68                 struct dma_chan *(*acpi_dma_xlate)
 66                 (struct acpi_dma_spec *, struc     69                 (struct acpi_dma_spec *, struct acpi_dma *),
 67                 void *data);                       70                 void *data);
 68 void devm_acpi_dma_controller_free(struct devi     71 void devm_acpi_dma_controller_free(struct device *dev);
 69                                                    72 
 70 struct dma_chan *acpi_dma_request_slave_chan_b     73 struct dma_chan *acpi_dma_request_slave_chan_by_index(struct device *dev,
 71                                                    74                                                       size_t index);
 72 struct dma_chan *acpi_dma_request_slave_chan_b     75 struct dma_chan *acpi_dma_request_slave_chan_by_name(struct device *dev,
 73                                                    76                                                      const char *name);
 74                                                    77 
 75 struct dma_chan *acpi_dma_simple_xlate(struct      78 struct dma_chan *acpi_dma_simple_xlate(struct acpi_dma_spec *dma_spec,
 76                                        struct      79                                        struct acpi_dma *adma);
 77 #else                                              80 #else
 78                                                    81 
 79 static inline int acpi_dma_controller_register     82 static inline int acpi_dma_controller_register(struct device *dev,
 80                 struct dma_chan *(*acpi_dma_xl     83                 struct dma_chan *(*acpi_dma_xlate)
 81                 (struct acpi_dma_spec *, struc     84                 (struct acpi_dma_spec *, struct acpi_dma *),
 82                 void *data)                        85                 void *data)
 83 {                                                  86 {
 84         return -ENODEV;                            87         return -ENODEV;
 85 }                                                  88 }
 86 static inline int acpi_dma_controller_free(str     89 static inline int acpi_dma_controller_free(struct device *dev)
 87 {                                                  90 {
 88         return -ENODEV;                            91         return -ENODEV;
 89 }                                                  92 }
 90 static inline int devm_acpi_dma_controller_reg     93 static inline int devm_acpi_dma_controller_register(struct device *dev,
 91                 struct dma_chan *(*acpi_dma_xl     94                 struct dma_chan *(*acpi_dma_xlate)
 92                 (struct acpi_dma_spec *, struc     95                 (struct acpi_dma_spec *, struct acpi_dma *),
 93                 void *data)                        96                 void *data)
 94 {                                                  97 {
 95         return -ENODEV;                            98         return -ENODEV;
 96 }                                                  99 }
 97 static inline void devm_acpi_dma_controller_fr    100 static inline void devm_acpi_dma_controller_free(struct device *dev)
 98 {                                                 101 {
 99 }                                                 102 }
100                                                   103 
101 static inline struct dma_chan *acpi_dma_reques    104 static inline struct dma_chan *acpi_dma_request_slave_chan_by_index(
102                 struct device *dev, size_t ind    105                 struct device *dev, size_t index)
103 {                                                 106 {
104         return ERR_PTR(-ENODEV);                  107         return ERR_PTR(-ENODEV);
105 }                                                 108 }
106 static inline struct dma_chan *acpi_dma_reques    109 static inline struct dma_chan *acpi_dma_request_slave_chan_by_name(
107                 struct device *dev, const char    110                 struct device *dev, const char *name)
108 {                                                 111 {
109         return ERR_PTR(-ENODEV);                  112         return ERR_PTR(-ENODEV);
110 }                                                 113 }
111                                                   114 
112 #define acpi_dma_simple_xlate   NULL              115 #define acpi_dma_simple_xlate   NULL
113                                                   116 
114 #endif                                            117 #endif
115                                                   118 
116 #define acpi_dma_request_slave_channel  acpi_d    119 #define acpi_dma_request_slave_channel  acpi_dma_request_slave_chan_by_index
117                                                   120 
118 #endif /* __LINUX_ACPI_DMA_H */                   121 #endif /* __LINUX_ACPI_DMA_H */
119                                                   122 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php