Forks spike platsupport files for shodan platform Change-Id: I7138a8fead096ee131b5348d7889c2cdbd6f38f3
diff --git a/libplatsupport/plat_include/shodan/platsupport/plat/clock.h b/libplatsupport/plat_include/shodan/platsupport/plat/clock.h new file mode 100644 index 0000000..089b31f --- /dev/null +++ b/libplatsupport/plat_include/shodan/platsupport/plat/clock.h
@@ -0,0 +1,25 @@ +/* + * Copyright 2018, Data61 + * Commonwealth Scientific and Industrial Research Organisation (CSIRO) + * ABN 41 687 119 230. + * + * This software may be distributed and modified according to the terms of + * the BSD 2-Clause license. Note that NO WARRANTY is provided. + * See "LICENSE_BSD2.txt" for details. + * + * @TAG(DATA61_BSD) + */ +#pragma once + +enum clk_id { + CLK_MASTER, + /* ----- */ + NCLOCKS, + /* Custom clock */ + CLK_CUSTOM, +}; + +enum clock_gate { + NCLKGATES +}; +
diff --git a/libplatsupport/plat_include/shodan/platsupport/plat/serial.h b/libplatsupport/plat_include/shodan/platsupport/plat/serial.h new file mode 100644 index 0000000..ac6a134 --- /dev/null +++ b/libplatsupport/plat_include/shodan/platsupport/plat/serial.h
@@ -0,0 +1,25 @@ +/* + * Copyright 2018, Data61 + * Commonwealth Scientific and Industrial Research Organisation (CSIRO) + * ABN 41 687 119 230. + * + * This software may be distributed and modified according to the terms of + * the BSD 2-Clause license. Note that NO WARRANTY is provided. + * See "LICENSE_BSD2.txt" for details. + * + * @TAG(DATA61_BSD) + */ +#pragma once + + +enum chardev_id { + PS_SERIAL0, + PS_SERIAL1, + /* defaults */ + PS_SERIAL_DEFAULT = PS_SERIAL1 +}; + +#define PS_SERIAL_DEFAULT 0 + +#define DEFAULT_SERIAL_PADDR NULL +#define DEFAULT_SERIAL_INTERRUPT 0
diff --git a/libplatsupport/plat_include/shodan/platsupport/plat/timer.h b/libplatsupport/plat_include/shodan/platsupport/plat/timer.h new file mode 100644 index 0000000..bbb9bc3 --- /dev/null +++ b/libplatsupport/plat_include/shodan/platsupport/plat/timer.h
@@ -0,0 +1,12 @@ +/* + * Copyright 2018, Data61 + * Commonwealth Scientific and Industrial Research Organisation (CSIRO) + * ABN 41 687 119 230. + * + * This software may be distributed and modified according to the terms of + * the BSD 2-Clause license. Note that NO WARRANTY is provided. + * See "LICENSE_BSD2.txt" for details. + * + * @TAG(DATA61_BSD) + */ +#pragma once
diff --git a/libplatsupport/src/plat/shodan/chardev.c b/libplatsupport/src/plat/shodan/chardev.c new file mode 100644 index 0000000..9690fc0 --- /dev/null +++ b/libplatsupport/src/plat/shodan/chardev.c
@@ -0,0 +1,22 @@ +/* + * Copyright 2018, Data61 + * Commonwealth Scientific and Industrial Research Organisation (CSIRO) + * ABN 41 687 119 230. + * + * This software may be distributed and modified according to the terms of + * the BSD 2-Clause license. Note that NO WARRANTY is provided. + * See "LICENSE_BSD2.txt" for details. + * + * @TAG(DATA61_BSD) + */ +#include "../../chardev.h" +#include "../../common.h" +#include <utils/util.h> + +#include "../../chardev.h" + +struct ps_chardevice* +ps_cdev_init(enum chardev_id id, const ps_io_ops_t* o, struct ps_chardevice* d) { + return NULL; +} +
diff --git a/libplatsupport/src/plat/shodan/serial.c b/libplatsupport/src/plat/shodan/serial.c new file mode 100644 index 0000000..aa2b0e7 --- /dev/null +++ b/libplatsupport/src/plat/shodan/serial.c
@@ -0,0 +1,23 @@ +/* + * Copyright 2018, Data61 + * Commonwealth Scientific and Industrial Research Organisation (CSIRO) + * ABN 41 687 119 230. + * + * This software may be distributed and modified according to the terms of + * the BSD 2-Clause license. Note that NO WARRANTY is provided. + * See "LICENSE_BSD2.txt" for details. + * + * @TAG(DATA61_BSD) + */ +#include <stdlib.h> +#include <platsupport/serial.h> +#include <platsupport/plat/serial.h> +#include <string.h> + + +int uart_init(const struct dev_defn* defn, + const ps_io_ops_t* ops, + ps_chardevice_t* dev) +{ + return 0; +}