flash/nor/sh_qspi: Add SH QSPI driver
[fw/openocd] / src / flash / nor / dsp5680xx_flash.c
index b935a1e895c60ae2fc94897cec694c788ed2fab1..37b60f0014c82fc652c8dfed1434044831a1d3a0 100644 (file)
@@ -18,9 +18,7 @@
  *   GNU General Public License for more details.                          *
  *                                                                         *
  *   You should have received a copy of the GNU General Public License     *
- *   along with this program; if not, write to the                         *
- *   Free Software Foundation, Inc.,                                       *
- *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.           *
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>. *
  ***************************************************************************/
 
 /**
@@ -156,7 +154,7 @@ static int dsp5680xx_flash_protect(struct flash_bank *bank, int set, int first,
  *
  * @return
  */
-static int dsp5680xx_flash_write(struct flash_bank *bank, uint8_t * buffer,
+static int dsp5680xx_flash_write(struct flash_bank *bank, const uint8_t* buffer,
                                 uint32_t offset, uint32_t count)
 {
        int retval;
@@ -193,14 +191,6 @@ static int dsp5680xx_probe(struct flash_bank *bank)
        return ERROR_OK;
 }
 
-static int dsp5680xx_flash_info(struct flash_bank *bank, char *buf,
-               int buf_size)
-{
-       snprintf(buf, buf_size,
-               "\ndsp5680xx flash driver info:\n - See comments in code.");
-       return ERROR_OK;
-}
-
 /**
  * The flash module (FM) on the dsp5680xx supports both individual sector
  * and mass erase of the flash memory.
@@ -266,7 +256,7 @@ static int dsp5680xx_flash_erase_check(struct flash_bank *bank)
        return retval;
 }
 
-struct flash_driver dsp5680xx_flash = {
+const struct flash_driver dsp5680xx_flash = {
        .name = "dsp5680xx_flash",
        .flash_bank_command = dsp5680xx_flash_bank_command,
        .erase = dsp5680xx_flash_erase,
@@ -277,5 +267,4 @@ struct flash_driver dsp5680xx_flash = {
        .auto_probe = dsp5680xx_probe,
        .erase_check = dsp5680xx_flash_erase_check,
        .protect_check = dsp5680xx_flash_protect_check,
-       .info = dsp5680xx_flash_info
 };