]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/psyent/common/AMDLV065D.c
pcm051: use ti_am335x_common.h config
[karo-tx-uboot.git] / board / psyent / common / AMDLV065D.c
index 0fcf354cdc4289cab4a7f1515066937416c9a226..64cb97029eeb043fde19fc6f6ca7ae78bc8c14a5 100644 (file)
@@ -2,32 +2,12 @@
  * (C) Copyright 2000-2004
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * 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., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 
 #include <common.h>
-#if defined(CONFIG_NIOS)
-#include <nios.h>
-#else
 #include <asm/io.h>
-#endif
 
 #define SECTSZ         (64 * 1024)
 flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];
@@ -122,12 +102,12 @@ int flash_erase (flash_info_t * info, int s_first, int s_last)
        for (sect = s_first; sect <= s_last; sect++) {
                if (info->protect[sect] == 0) { /* not protected */
                        addr2 = (unsigned char *) info->start[sect];
-                       writeb (addr, 0xaa);
-                       writeb (addr,  0x55);
-                       writeb (addr,  0x80);
-                       writeb (addr,  0xaa);
-                       writeb (addr,  0x55);
-                       writeb (addr2, 0x30);
+                       writeb (0xaa, addr);
+                       writeb (0x55, addr);
+                       writeb (0x80, addr);
+                       writeb (0xaa, addr);
+                       writeb (0x55, addr);
+                       writeb (0x30, addr2);
                        /* Now just wait for 0xff & provide some user
                         * feedback while we wait.
                         */
@@ -169,9 +149,9 @@ int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt)
                        return (2);
                }
 
-               writeb (cmd,  0xaa);
-               writeb (cmd,  0x55);
-               writeb (cmd,  0xa0);
+               writeb (0xaa, cmd);
+               writeb (0x55, cmd);
+               writeb (0xa0, cmd);
                writeb (dst, b);
 
                /* Verify write */