Commit 6d11f60d authored by Alessandro Rubini's avatar Alessandro Rubini

softpll-unify: header changes (no effect on rt_cpu.bin)

The commit is part of the effort in unifying softpll with wrpc-sw,
and later remove the duplicated code here in wr-switch-sw.

This introduces a fake wrc.h and renames timer.h to syscon.h.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent d0366747
......@@ -8,7 +8,7 @@
#include <stdint.h>
#include "board.h"
#include "timer.h"
#include "syscon.h"
#include "gpio.h"
......@@ -264,4 +264,4 @@ int rts_debug_command(int command, int value)
}
break;
}
}
\ No newline at end of file
}
#include "board.h"
#include "timer.h"
#include "syscon.h"
uint32_t timer_get_tics()
{
......
#ifndef __TIMER_H
#define __TIMER_H
#ifndef __SYSCON_H
#define __SYSCON_H
#include "defs.h"
......
#ifndef __WRC_H
#define __WRC_H
#include "defs.h"
#include "syscon.h"
#define PPS_WIDTH (10 * 1000 * 1000 / 16) /* 10ms */
#endif
#include "defs.h"
#include "uart.h"
#include "timer.h"
#include "syscon.h"
#include "softpll_ng.h"
......
......@@ -2,6 +2,7 @@
#include <stdlib.h>
#include <string.h>
#include <wrc.h>
#include "board.h"
#include "trace.h"
#include "hw/softpll_regs.h"
......@@ -10,7 +11,6 @@
#include "softpll_ng.h"
#include "irq.h"
#include "timer.h"
volatile int irq_count = 0;
......@@ -519,7 +519,6 @@ void spll_show_stats()
softpll.ext.ld.locked, softpll.mpll.ld.locked,
softpll.helper.pi.y, softpll.mpll.pi.y, softpll.ext.pi.y,
softpll.delock_count, softpll.ext.sample_n);
}
int spll_shifter_busy(int channel)
......
......@@ -14,6 +14,7 @@
#include <stdint.h>
#include <stdlib.h>
#include <syscon.h>
#include <hw/softpll_regs.h>
#include <hw/pps_gen_regs.h>
......@@ -30,6 +31,7 @@ extern int spll_n_chan_ref, spll_n_chan_out;
extern volatile struct SPLL_WB *SPLL;
extern volatile struct PPSG_WB *PPSG;
/* PI regulator state */
typedef struct {
int ki, kp; /* integral and proportional gains (1<<PI_FRACBITS == 1.0f) */
......
......@@ -13,8 +13,6 @@
#include "spll_external.h"
#include "spll_debug.h"
#include "timer.h"
#define BB_ERROR_BITS 16
void external_init(volatile struct spll_external_state *s, int ext_ref,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment