1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* Copyright 2024-2025 Tomeu Vizoso <tomeu@tomeuvizoso.net> */ 3 4 #ifndef __ROCKET_DEVICE_H__ 5 #define __ROCKET_DEVICE_H__ 6 7 #include <drm/drm_device.h> 8 #include <linux/clk.h> 9 #include <linux/container_of.h> 10 #include <linux/iommu.h> 11 #include <linux/platform_device.h> 12 13 #include "rocket_core.h" 14 15 struct rocket_device { 16 struct drm_device ddev; 17 18 struct rocket_core *cores; 19 unsigned int num_cores; 20 }; 21 22 struct rocket_device *rocket_device_init(struct platform_device *pdev, 23 const struct drm_driver *rocket_drm_driver); 24 void rocket_device_fini(struct rocket_device *rdev); 25 #define to_rocket_device(drm_dev) \ 26 ((struct rocket_device *)(container_of((drm_dev), struct rocket_device, ddev))) 27 28 #endif /* __ROCKET_DEVICE_H__ */ 29