Message ID | 222ae66639312712e145bd04d5dd1ebd2c511d43.1708086092.git.oleksii.kurochko@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Introduce generic headers | expand |
Hello Shawn, Would you mind taking a look at this patch? Thanks in advance. Best regards, Oleksii On Fri, 2024-02-16 at 13:39 +0100, Oleksii Kurochko wrote: > Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com> > --- > Changed in V8: > - nothing changed. only rebase. > --- > Changes in V7: > - newly introduced patch which is based on the previous version of > the patch: > [PATCH v6 9/9] xen/asm-generic: introduce generic device.h > --- > xen/arch/ppc/include/asm/Makefile | 1 + > xen/arch/ppc/include/asm/device.h | 53 ----------------------------- > -- > 2 files changed, 1 insertion(+), 53 deletions(-) > delete mode 100644 xen/arch/ppc/include/asm/device.h > > diff --git a/xen/arch/ppc/include/asm/Makefile > b/xen/arch/ppc/include/asm/Makefile > index 3fd893f3e0..ced02e26ed 100644 > --- a/xen/arch/ppc/include/asm/Makefile > +++ b/xen/arch/ppc/include/asm/Makefile > @@ -1,5 +1,6 @@ > # SPDX-License-Identifier: GPL-2.0-only > generic-y += altp2m.h > +generic-y += device.h > generic-y += div64.h > generic-y += hardirq.h > generic-y += hypercall.h > diff --git a/xen/arch/ppc/include/asm/device.h > b/xen/arch/ppc/include/asm/device.h > deleted file mode 100644 > index 8253e61d51..0000000000 > --- a/xen/arch/ppc/include/asm/device.h > +++ /dev/null > @@ -1,53 +0,0 @@ > -/* SPDX-License-Identifier: GPL-2.0-only */ > -#ifndef __ASM_PPC_DEVICE_H__ > -#define __ASM_PPC_DEVICE_H__ > - > -enum device_type > -{ > - DEV_DT, > - DEV_PCI, > -}; > - > -struct device { > - enum device_type type; > -#ifdef CONFIG_HAS_DEVICE_TREE > - struct dt_device_node *of_node; /* Used by drivers imported from > Linux */ > -#endif > -}; > - > -enum device_class > -{ > - DEVICE_SERIAL, > - DEVICE_IOMMU, > - DEVICE_PCI_HOSTBRIDGE, > - /* Use for error */ > - DEVICE_UNKNOWN, > -}; > - > -struct device_desc { > - /* Device name */ > - const char *name; > - /* Device class */ > - enum device_class class; > - /* List of devices supported by this driver */ > - const struct dt_device_match *dt_match; > - /* > - * Device initialization. > - * > - * -EAGAIN is used to indicate that device probing is deferred. > - */ > - int (*init)(struct dt_device_node *dev, const void *data); > -}; > - > -typedef struct device device_t; > - > -#define DT_DEVICE_START(name_, namestr_, class_) > \ > -static const struct device_desc __dev_desc_##name_ __used > \ > -__section(".dev.info") = { > \ > - .name = namestr_, > \ > - .class = class_, > \ > - > -#define DT_DEVICE_END > \ > -}; > - > -#endif /* __ASM_PPC_DEVICE_H__ */
Hi Oleksii, On 2/16/24 6:39 AM, Oleksii Kurochko wrote: > Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com> Acked-by: Shawn Anastasio <sanastasio@raptorengineering.com> Thanks, Shawn
diff --git a/xen/arch/ppc/include/asm/Makefile b/xen/arch/ppc/include/asm/Makefile index 3fd893f3e0..ced02e26ed 100644 --- a/xen/arch/ppc/include/asm/Makefile +++ b/xen/arch/ppc/include/asm/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only generic-y += altp2m.h +generic-y += device.h generic-y += div64.h generic-y += hardirq.h generic-y += hypercall.h diff --git a/xen/arch/ppc/include/asm/device.h b/xen/arch/ppc/include/asm/device.h deleted file mode 100644 index 8253e61d51..0000000000 --- a/xen/arch/ppc/include/asm/device.h +++ /dev/null @@ -1,53 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ASM_PPC_DEVICE_H__ -#define __ASM_PPC_DEVICE_H__ - -enum device_type -{ - DEV_DT, - DEV_PCI, -}; - -struct device { - enum device_type type; -#ifdef CONFIG_HAS_DEVICE_TREE - struct dt_device_node *of_node; /* Used by drivers imported from Linux */ -#endif -}; - -enum device_class -{ - DEVICE_SERIAL, - DEVICE_IOMMU, - DEVICE_PCI_HOSTBRIDGE, - /* Use for error */ - DEVICE_UNKNOWN, -}; - -struct device_desc { - /* Device name */ - const char *name; - /* Device class */ - enum device_class class; - /* List of devices supported by this driver */ - const struct dt_device_match *dt_match; - /* - * Device initialization. - * - * -EAGAIN is used to indicate that device probing is deferred. - */ - int (*init)(struct dt_device_node *dev, const void *data); -}; - -typedef struct device device_t; - -#define DT_DEVICE_START(name_, namestr_, class_) \ -static const struct device_desc __dev_desc_##name_ __used \ -__section(".dev.info") = { \ - .name = namestr_, \ - .class = class_, \ - -#define DT_DEVICE_END \ -}; - -#endif /* __ASM_PPC_DEVICE_H__ */
Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com> --- Changed in V8: - nothing changed. only rebase. --- Changes in V7: - newly introduced patch which is based on the previous version of the patch: [PATCH v6 9/9] xen/asm-generic: introduce generic device.h --- xen/arch/ppc/include/asm/Makefile | 1 + xen/arch/ppc/include/asm/device.h | 53 ------------------------------- 2 files changed, 1 insertion(+), 53 deletions(-) delete mode 100644 xen/arch/ppc/include/asm/device.h