stellaris_flash_bank_t -> struct stellaris_flash_bank
authorZachary T Welch <zw@superlucidity.net>
Fri, 13 Nov 2009 15:38:55 +0000 (07:38 -0800)
committerZachary T Welch <zw@superlucidity.net>
Fri, 13 Nov 2009 19:58:07 +0000 (11:58 -0800)
Remove misleading typedef and redundant suffix from struct stellaris_flash_bank.

src/flash/stellaris.c
src/flash/stellaris.h

index 9bd329d17316d0f4e9329387fdf70ef5f20e1969..7799800659db024c32869297aef8090ed1a88d80 100644 (file)
@@ -215,7 +215,7 @@ static char * StellarisClassname[5] =
  */
 FLASH_BANK_COMMAND_HANDLER(stellaris_flash_bank_command)
 {
-       stellaris_flash_bank_t *stellaris_info;
+       struct stellaris_flash_bank *stellaris_info;
 
        if (argc < 6)
        {
@@ -223,7 +223,7 @@ FLASH_BANK_COMMAND_HANDLER(stellaris_flash_bank_command)
                return ERROR_FLASH_BANK_INVALID;
        }
 
-       stellaris_info = calloc(sizeof(stellaris_flash_bank_t), 1);
+       stellaris_info = calloc(sizeof(struct stellaris_flash_bank), 1);
        bank->base = 0x0;
        bank->driver_priv = stellaris_info;
 
@@ -242,7 +242,7 @@ FLASH_BANK_COMMAND_HANDLER(stellaris_flash_bank_command)
 static int stellaris_info(struct flash_bank_s *bank, char *buf, int buf_size)
 {
        int printed, device_class;
-       stellaris_flash_bank_t *stellaris_info = bank->driver_priv;
+       struct stellaris_flash_bank *stellaris_info = bank->driver_priv;
 
        stellaris_read_part_info(bank);
 
@@ -363,7 +363,7 @@ static const unsigned rcc_xtal[32] = {
 
 static void stellaris_read_clock_info(flash_bank_t *bank)
 {
-       stellaris_flash_bank_t *stellaris_info = bank->driver_priv;
+       struct stellaris_flash_bank *stellaris_info = bank->driver_priv;
        target_t *target = bank->target;
        uint32_t rcc, rcc2, pllcfg, sysdiv, usesysdiv, bypass, oscsrc;
        unsigned xtal;
@@ -450,7 +450,7 @@ static void stellaris_read_clock_info(flash_bank_t *bank)
 /* Setup the timimg registers */
 static void stellaris_set_flash_mode(flash_bank_t *bank,int mode)
 {
-       stellaris_flash_bank_t *stellaris_info = bank->driver_priv;
+       struct stellaris_flash_bank *stellaris_info = bank->driver_priv;
        target_t *target = bank->target;
 
        uint32_t usecrl = (stellaris_info->mck_freq/1000000ul-1);
@@ -497,7 +497,7 @@ static int stellaris_flash_command(struct flash_bank_s *bank,uint8_t cmd,uint16_
 /* Read device id register, main clock frequency register and fill in driver info structure */
 static int stellaris_read_part_info(struct flash_bank_s *bank)
 {
-       stellaris_flash_bank_t *stellaris_info = bank->driver_priv;
+       struct stellaris_flash_bank *stellaris_info = bank->driver_priv;
        target_t *target = bank->target;
        uint32_t did0, did1, ver, fam, status;
        int i;
@@ -617,7 +617,7 @@ static int stellaris_protect_check(struct flash_bank_s *bank)
 {
        uint32_t status;
 
-       stellaris_flash_bank_t *stellaris_info = bank->driver_priv;
+       struct stellaris_flash_bank *stellaris_info = bank->driver_priv;
 
        if (bank->target->state != TARGET_HALTED)
        {
@@ -646,7 +646,7 @@ static int stellaris_erase(struct flash_bank_s *bank, int first, int last)
 {
        int banknr;
        uint32_t flash_fmc, flash_cris;
-       stellaris_flash_bank_t *stellaris_info = bank->driver_priv;
+       struct stellaris_flash_bank *stellaris_info = bank->driver_priv;
        target_t *target = bank->target;
 
        if (bank->target->state != TARGET_HALTED)
@@ -717,7 +717,7 @@ static int stellaris_protect(struct flash_bank_s *bank, int set, int first, int
        uint32_t fmppe, flash_fmc, flash_cris;
        int lockregion;
 
-       stellaris_flash_bank_t *stellaris_info = bank->driver_priv;
+       struct stellaris_flash_bank *stellaris_info = bank->driver_priv;
        target_t *target = bank->target;
 
        if (bank->target->state != TARGET_HALTED)
@@ -910,7 +910,7 @@ static int stellaris_write_block(struct flash_bank_s *bank, uint8_t *buffer, uin
 
 static int stellaris_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t offset, uint32_t count)
 {
-       stellaris_flash_bank_t *stellaris_info = bank->driver_priv;
+       struct stellaris_flash_bank *stellaris_info = bank->driver_priv;
        target_t *target = bank->target;
        uint32_t address = offset;
        uint32_t flash_cris, flash_fmc;
@@ -1061,7 +1061,7 @@ static int stellaris_probe(struct flash_bank_s *bank)
 
 static int stellaris_auto_probe(struct flash_bank_s *bank)
 {
-       stellaris_flash_bank_t *stellaris_info = bank->driver_priv;
+       struct stellaris_flash_bank *stellaris_info = bank->driver_priv;
        if (stellaris_info->did1)
                return ERROR_OK;
        return stellaris_probe(bank);
@@ -1070,7 +1070,7 @@ static int stellaris_auto_probe(struct flash_bank_s *bank)
 static int stellaris_mass_erase(struct flash_bank_s *bank)
 {
        target_t *target = NULL;
-       stellaris_flash_bank_t *stellaris_info = NULL;
+       struct stellaris_flash_bank *stellaris_info = NULL;
        uint32_t flash_fmc;
 
        stellaris_info = bank->driver_priv;
index eaf3d481207ba528b8ee2ab1c24d836344f93d2a..949a346de47222434e43e79256bcca8c3b2c162d 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "flash.h"
 
-typedef struct stellaris_flash_bank_s
+struct stellaris_flash_bank
 {
        /* chip id register */
        uint32_t did0;
@@ -52,7 +52,7 @@ typedef struct stellaris_flash_bank_s
        uint32_t mck_freq;
        const char *iosc_desc;
        const char *mck_desc;
-} stellaris_flash_bank_t;
+};
 
 /* STELLARIS control registers */
 #define SCB_BASE       0x400FE000

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)