blob: a9c36260d8e1db2d59c999e3282932f48161fd4b [file] [edit]
/*
* Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
*
* SPDX-License-Identifier: GPL-2.0-only
*/
#include <camkes.h>
#include <camkes/io.h>
#include <camkes/dma.h>
#include <ethdrivers/raw.h>
#include <ethdrivers/zynq7000.h>
#include <platsupport/io.h>
#include <platsupport/clock.h>
#include <platsupport/irq.h>
static int init_device(ps_io_ops_t *io_ops)
{
// This may reinitialise the clocks, timeserver might not like this,
// but zynq7000/uboot/zynq_gem.c requires access to the SLCR registers
// to configure some clocks related to the Ethernet device.
return clock_sys_init(io_ops, &io_ops->clock_sys);
}
CAMKES_PRE_INIT_MODULE_DEFINE(ethdriver_setup, init_device);