#include "log.h"
-static int s3c2440_set_gpio_to_output (mflash_gpio_num_t gpio);
-static int s3c2440_set_gpio_output_val (mflash_gpio_num_t gpio, uint8_t val);
-static int pxa270_set_gpio_to_output (mflash_gpio_num_t gpio);
-static int pxa270_set_gpio_output_val (mflash_gpio_num_t gpio, uint8_t val);
+static int s3c2440_set_gpio_to_output (struct mflash_gpio_num gpio);
+static int s3c2440_set_gpio_output_val (struct mflash_gpio_num gpio, uint8_t val);
+static int pxa270_set_gpio_to_output (struct mflash_gpio_num gpio);
+static int pxa270_set_gpio_output_val (struct mflash_gpio_num gpio, uint8_t val);
static command_t *mflash_cmd;
#define PXA270_GPSR0 0x40E00018
#define PXA270_GPCR0 0x40E00024
-static int pxa270_set_gpio_to_output (mflash_gpio_num_t gpio)
+static int pxa270_set_gpio_to_output (struct mflash_gpio_num gpio)
{
uint32_t addr, value, mask;
target_t *target = mflash_bank->target;
return ret;
}
-static int pxa270_set_gpio_output_val (mflash_gpio_num_t gpio, uint8_t val)
+static int pxa270_set_gpio_output_val (struct mflash_gpio_num gpio, uint8_t val)
{
uint32_t addr, value, mask;
target_t *target = mflash_bank->target;
#define S3C2440_GPJCON 0x560000d0
#define S3C2440_GPJDAT 0x560000d4
-static int s3c2440_set_gpio_to_output (mflash_gpio_num_t gpio)
+static int s3c2440_set_gpio_to_output (struct mflash_gpio_num gpio)
{
uint32_t data, mask, gpio_con;
target_t *target = mflash_bank->target;
return ret;
}
-static int s3c2440_set_gpio_output_val (mflash_gpio_num_t gpio, uint8_t val)
+static int s3c2440_set_gpio_output_val (struct mflash_gpio_num gpio, uint8_t val)
{
uint32_t data, mask, gpio_dat;
target_t *target = mflash_bank->target;
typedef unsigned short mg_io_uint16;
typedef unsigned char mg_io_uint8;
-typedef struct mflash_gpio_num_s
+struct mflash_gpio_num
{
char port[2];
signed short num;
-} mflash_gpio_num_t;
+};
typedef struct mflash_gpio_drv_s
{
char *name;
- int (*set_gpio_to_output) (mflash_gpio_num_t gpio);
- int (*set_gpio_output_val) (mflash_gpio_num_t gpio, uint8_t val);
+ int (*set_gpio_to_output) (struct mflash_gpio_num gpio);
+ int (*set_gpio_output_val) (struct mflash_gpio_num gpio, uint8_t val);
} mflash_gpio_drv_t;
typedef struct _mg_io_type_drv_info {
{
uint32_t base;
- mflash_gpio_num_t rst_pin;
+ struct mflash_gpio_num rst_pin;
mflash_gpio_drv_t *gpio_drv;
target_t *target;