summaryrefslogtreecommitdiff
path: root/src/flash
diff options
context:
space:
mode:
Diffstat (limited to 'src/flash')
-rw-r--r--src/flash/mflash.c16
-rw-r--r--src/flash/mflash.h10
2 files changed, 13 insertions, 13 deletions
diff --git a/src/flash/mflash.c b/src/flash/mflash.c
index 54578da3..84ad3a8a 100644
--- a/src/flash/mflash.c
+++ b/src/flash/mflash.c
@@ -27,10 +27,10 @@
#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;
@@ -64,7 +64,7 @@ static mflash_gpio_drv_t *mflash_gpio[] =
#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;
@@ -101,7 +101,7 @@ static int pxa270_set_gpio_to_output (mflash_gpio_num_t gpio)
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;
@@ -130,7 +130,7 @@ static int pxa270_set_gpio_output_val (mflash_gpio_num_t gpio, uint8_t val)
#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;
@@ -162,7 +162,7 @@ static int s3c2440_set_gpio_to_output (mflash_gpio_num_t gpio)
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;
diff --git a/src/flash/mflash.h b/src/flash/mflash.h
index 1b54307c..75fbaa44 100644
--- a/src/flash/mflash.h
+++ b/src/flash/mflash.h
@@ -26,17 +26,17 @@ typedef unsigned long mg_io_uint32;
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 {
@@ -134,7 +134,7 @@ typedef struct mflash_bank_s
{
uint32_t base;
- mflash_gpio_num_t rst_pin;
+ struct mflash_gpio_num rst_pin;
mflash_gpio_drv_t *gpio_drv;
target_t *target;