coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <device/mmio.h>
#include <soc/addressmap.h>
#include <soc/grf.h>
#include <soc/soc.h>
#include <soc/pwm.h>
#include <soc/clock.h>
#include <timer.h>
Go to the source code of this file.
Data Structures | |
struct | pwm_ctl |
struct | rk_pwm_regs |
Macros | |
#define | RK_PWM_DISABLE (0 << 0) |
#define | RK_PWM_ENABLE (1 << 0) |
#define | PWM_ONE_SHOT (0 << 1) |
#define | PWM_CONTINUOUS (1 << 1) |
#define | RK_PWM_CAPTURE (1 << 2) |
#define | PWM_DUTY_POSTIVE (1 << 3) |
#define | PWM_DUTY_NEGATIVE (0 << 3) |
#define | PWM_INACTIVE_POSTIVE (1 << 4) |
#define | PWM_INACTIVE_NEGATIVE (0 << 4) |
#define | PWM_OUTPUT_LEFT (0 << 5) |
#define | PWM_OUTPUT_CENTER (1 << 5) |
#define | PWM_LP_ENABLE (1 << 8) |
#define | PWM_LP_DISABLE (0 << 8) |
#define | PWM_SEL_SCALE_CLK (1 << 9) |
#define | PWM_SEL_SRC_CLK (0 << 9) |
Functions | |
check_member (rk_pwm_regs, int_en, 0x44) | |
void | pwm_init (u32 id, u32 period_ns, u32 duty_ns) |
Variables | |
struct rk_pwm_regs * | rk_pwm = (void *)RK_PWM_BASE |
check_member | ( | rk_pwm_regs | , |
int_en | , | ||
0x44 | |||
) |
Definition at line 49 of file pwm.c.
References rk_pwm_regs::pwm, PWM_CLOCK_HZ, PWM_CONTINUOUS, pwm_ctl::pwm_ctrl, pwm_ctl::pwm_duty_lpr, PWM_DUTY_POSTIVE, PWM_INACTIVE_POSTIVE, PWM_LP_DISABLE, PWM_OUTPUT_LEFT, pwm_ctl::pwm_period_hpr, PWM_SEL_SRC_CLK, rk3288_grf, rk_pwm, RK_PWM_DISABLE, RK_PWM_ENABLE, RK_SETBITS, setbits32, rk3288_grf_regs::soc_con2, USECS_PER_SEC, and write32().
Referenced by pwm_regulator_configure(), and regulate_vdd_log().
struct rk_pwm_regs* rk_pwm = (void *)RK_PWM_BASE |
Definition at line 47 of file pwm.c.
Referenced by pwm_init().