]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - lib/display_options.c
dm: exynos: Add pinctrl settings for s5p_goni
[karo-tx-uboot.git] / lib / display_options.c
index e6d684bd60bdc3e18ef077775d8f532eaeb8d352..4c0c886d61567ce10cdb6066d09d396feec500ee 100644 (file)
@@ -2,23 +2,7 @@
  * (C) Copyright 2000-2002
  * 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 <config.h>
@@ -103,11 +87,19 @@ int print_buffer(ulong addr, const void *data, uint width, uint count,
 {
        /* linebuf as a union causes proper alignment */
        union linebuf {
+#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA
+               uint64_t uq[MAX_LINE_LENGTH_BYTES/sizeof(uint64_t) + 1];
+#endif
                uint32_t ui[MAX_LINE_LENGTH_BYTES/sizeof(uint32_t) + 1];
                uint16_t us[MAX_LINE_LENGTH_BYTES/sizeof(uint16_t) + 1];
                uint8_t  uc[MAX_LINE_LENGTH_BYTES/sizeof(uint8_t) + 1];
        } lb;
        int i;
+#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA
+       uint64_t x;
+#else
+       uint32_t x;
+#endif
 
        if (linelen*width > MAX_LINE_LENGTH_BYTES)
                linelen = MAX_LINE_LENGTH_BYTES / width;
@@ -124,14 +116,21 @@ int print_buffer(ulong addr, const void *data, uint width, uint count,
 
                /* Copy from memory into linebuf and print hex values */
                for (i = 0; i < thislinelen; i++) {
-                       uint32_t x;
                        if (width == 4)
                                x = lb.ui[i] = *(volatile uint32_t *)data;
+#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA
+                       else if (width == 8)
+                               x = lb.uq[i] = *(volatile uint64_t *)data;
+#endif
                        else if (width == 2)
                                x = lb.us[i] = *(volatile uint16_t *)data;
                        else
                                x = lb.uc[i] = *(volatile uint8_t *)data;
+#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA
+                       printf(" %0*llx", width * 2, x);
+#else
                        printf(" %0*x", width * 2, x);
+#endif
                        data += width;
                }