mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-09 00:51:29 +00:00
This commit adds initial support for rotor. Basic drivers including: - hardware timer - GPIO - UART - watchdog BUG=chrome-os-partner:51665 BRANCH=None TEST=make -j buildall tests Change-Id: I4e384fc69297f807268dcd43cf47f99ab059fd05 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/373202 Commit-Ready: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
62 lines
1.0 KiB
C
62 lines
1.0 KiB
C
/* Copyright 2016 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
/* System module for Rotor MCU */
|
|
|
|
#include "common.h"
|
|
#include "registers.h"
|
|
#include "system.h"
|
|
#include "task.h"
|
|
#include "watchdog.h"
|
|
|
|
void system_pre_init(void)
|
|
{
|
|
}
|
|
|
|
void system_reset(int flags)
|
|
{
|
|
/* Disable interrupts to avoid task swaps during reboot. */
|
|
interrupt_disable();
|
|
|
|
/* TODO: Implement flags and stuff. */
|
|
|
|
/*
|
|
* Try to trigger a watchdog reset, by setting the smallest timeout
|
|
* period we can.
|
|
*/
|
|
ROTOR_MCU_WDT_TORR = 0;
|
|
watchdog_reload();
|
|
|
|
/* Wait for system reset. */
|
|
while (1)
|
|
asm("wfi");
|
|
}
|
|
|
|
const char *system_get_chip_name(void)
|
|
{
|
|
return "rotor";
|
|
}
|
|
|
|
const char *system_get_chip_vendor(void)
|
|
{
|
|
return "";
|
|
}
|
|
|
|
const char *system_get_chip_revision(void)
|
|
{
|
|
return "";
|
|
}
|
|
|
|
int system_get_vbnvcontext(uint8_t *block)
|
|
{
|
|
return EC_ERROR_UNIMPLEMENTED;
|
|
}
|
|
|
|
int system_set_vbnvcontext(const uint8_t *block)
|
|
{
|
|
return EC_ERROR_UNIMPLEMENTED;
|
|
|
|
}
|