38 lines
559 B
C
38 lines
559 B
C
#include <common.h>
|
|
#include <asm/gpio.h>
|
|
|
|
#define GPIO_RESET_BUTTON (14)
|
|
|
|
void init_gpios(void)
|
|
{
|
|
gpio_request(GPIO_RESET_BUTTON, "GPIO_RESET_BUTTON");
|
|
gpio_direction_input(GPIO_RESET_BUTTON);
|
|
}
|
|
|
|
void out_usb_power(int enable)
|
|
{
|
|
// SET_LOGIC(enable, 1, BIT9);
|
|
}
|
|
|
|
void out_watchdog(int enable)
|
|
{
|
|
// SET_LOGIC(enable, 0, BIT19);
|
|
}
|
|
|
|
void out_fpga_logic_reset(int enable)
|
|
{
|
|
// SET_LOGIC(enable, 1, BIT12);
|
|
}
|
|
|
|
void out_ext_reset_en(int enable)
|
|
{
|
|
// SET_LOGIC(enable, 0, BIT7);
|
|
}
|
|
|
|
int in_reset_button(void)
|
|
{
|
|
return gpio_get_value(GPIO_RESET_BUTTON);
|
|
}
|
|
|
|
|