diff options
author | Abner Chang <abner.chang@hpe.com> | 2019-06-29 16:18:04 +0800 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2019-06-29 18:20:00 +0530 |
commit | fa6fd6bf86e97140cf3c991f605cf04a0b24ab50 (patch) | |
tree | 964d7521cda741aee67a1224e43773152022e5a1 /platform/kendryte | |
parent | 3048f979cab3d0f42461bd4d96a4bdecf1791f62 (diff) |
include: Move callbacks in sbi_platform to separate struct
Move platform opensbi functions to sbi_platform_operations structure.
Both sbi_platform and sbi_platform_operations structures are maintained
by platform vendors.
Signed-off-by: Abner Chang <abner.chang@hpe.com>
Acked-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'platform/kendryte')
-rw-r--r-- | platform/kendryte/k210/platform.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/platform/kendryte/k210/platform.c b/platform/kendryte/k210/platform.c index 299b343..f332dab 100644 --- a/platform/kendryte/k210/platform.c +++ b/platform/kendryte/k210/platform.c @@ -93,18 +93,10 @@ static int k210_system_shutdown(u32 type) return 0; } -const struct sbi_platform platform = { - - .name = "Kendryte K210", - .features = SBI_PLATFORM_HAS_TIMER_VALUE, - - .hart_count = K210_HART_COUNT, - .hart_stack_size = K210_HART_STACK_SIZE, - .disabled_hart_mask = 0, - - .console_init = k210_console_init, - .console_putc = k210_console_putc, - .console_getc = k210_console_getc, +const struct sbi_platform_operations platform_ops = { + .console_init = k210_console_init, + .console_putc = k210_console_putc, + .console_getc = k210_console_getc, .irqchip_init = k210_irqchip_init, @@ -121,3 +113,12 @@ const struct sbi_platform platform = { .system_reboot = k210_system_reboot, .system_shutdown = k210_system_shutdown }; + +const struct sbi_platform platform = { + .name = "Kendryte K210", + .features = SBI_PLATFORM_HAS_TIMER_VALUE, + .hart_count = K210_HART_COUNT, + .hart_stack_size = K210_HART_STACK_SIZE, + .disabled_hart_mask = 0, + .platform_ops_addr = (unsigned long)&platform_ops +}; |