diff options
Diffstat (limited to 'mali_kbase/mali_kbase_platform_fake.c')
-rw-r--r-- | mali_kbase/mali_kbase_platform_fake.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/mali_kbase/mali_kbase_platform_fake.c b/mali_kbase/mali_kbase_platform_fake.c index bf525ed..265c676 100644 --- a/mali_kbase/mali_kbase_platform_fake.c +++ b/mali_kbase/mali_kbase_platform_fake.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note /* * - * (C) COPYRIGHT 2011-2014, 2016-2017, 2020-2021 ARM Limited. All rights reserved. + * (C) COPYRIGHT 2011-2014, 2016-2017, 2020-2022 ARM Limited. All rights reserved. * * This program is free software and is provided to you under the terms of the * GNU General Public License version 2 as published by the Free Software @@ -32,14 +32,15 @@ */ #include <mali_kbase_config.h> +#ifndef CONFIG_OF + #define PLATFORM_CONFIG_RESOURCE_COUNT 4 -#define PLATFORM_CONFIG_IRQ_RES_COUNT 3 static struct platform_device *mali_device; -#ifndef CONFIG_OF /** - * Convert data in struct kbase_io_resources struct to Linux-specific resources + * kbasep_config_parse_io_resources - Convert data in struct kbase_io_resources + * struct to Linux-specific resources * @io_resources: Input IO resource data * @linux_resources: Pointer to output array of Linux resource structures * @@ -72,14 +73,11 @@ static void kbasep_config_parse_io_resources(const struct kbase_io_resources *io linux_resources[3].end = io_resources->gpu_irq_number; linux_resources[3].flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL; } -#endif /* CONFIG_OF */ int kbase_platform_register(void) { struct kbase_platform_config *config; -#ifndef CONFIG_OF struct resource resources[PLATFORM_CONFIG_RESOURCE_COUNT]; -#endif int err; config = kbase_get_platform_config(); /* declared in midgard/mali_kbase_config.h but defined in platform folder */ @@ -92,7 +90,6 @@ int kbase_platform_register(void) if (mali_device == NULL) return -ENOMEM; -#ifndef CONFIG_OF kbasep_config_parse_io_resources(config->io_resources, resources); err = platform_device_add_resources(mali_device, resources, PLATFORM_CONFIG_RESOURCE_COUNT); if (err) { @@ -100,7 +97,6 @@ int kbase_platform_register(void) mali_device = NULL; return err; } -#endif /* CONFIG_OF */ err = platform_device_add(mali_device); if (err) { @@ -119,3 +115,5 @@ void kbase_platform_unregister(void) platform_device_unregister(mali_device); } EXPORT_SYMBOL(kbase_platform_unregister); + +#endif /* CONFIG_OF */ |