]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - board/logicpd/zoom2/zoom2_serial.h
mx6slevk: Include "mx6_common.h"
[karo-tx-uboot.git] / board / logicpd / zoom2 / zoom2_serial.h
index a6d2427fef028e3ee7d0efbe7d5d07c5495da7cd..82244521ac51f1e0645d9a2e69a27b31be195480 100644 (file)
@@ -2,26 +2,14 @@
  * Copyright (c) 2009 Wind River Systems, Inc.
  * Tom Rix <Tom.Rix@windriver.com>
  *
- * 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+
  */
 
 #ifndef ZOOM2_SERIAL_H
 #define ZOOM2_SERIAL_H
 
+#include <linux/stringify.h>
+
 extern int zoom2_debug_board_connected (void);
 
 #define SERIAL_TL16CP754C_BASE 0x10000000      /* Zoom2 Serial chip address */
@@ -31,10 +19,6 @@ extern int zoom2_debug_board_connected (void);
 #define QUAD_BASE_2    (SERIAL_TL16CP754C_BASE + 0x200)
 #define QUAD_BASE_3    (SERIAL_TL16CP754C_BASE + 0x300)
 
-#define S(a) #a
-#define N(a) S(quad##a)
-#define U(a) S(UART##a)
-
 #define QUAD_INIT(n)                           \
 int quad_init_##n(void)                                \
 {                                              \
@@ -62,15 +46,14 @@ int quad_tstc_##n(void)                             \
 }                                              \
 struct serial_device zoom2_serial_device##n =  \
 {                                              \
-       N(n),                                   \
-       U(n),                                   \
-       quad_init_##n,                          \
-       NULL,                                   \
-       quad_setbrg_##n,                        \
-       quad_getc_##n,                          \
-       quad_tstc_##n,                          \
-       quad_putc_##n,                          \
-       quad_puts_##n,                          \
+       .name   = __stringify(n),               \
+       .start  = quad_init_##n,                \
+       .stop   = NULL,                         \
+       .setbrg = quad_setbrg_##n,              \
+       .getc   = quad_getc_##n,                \
+       .tstc   = quad_tstc_##n,                \
+       .putc   = quad_putc_##n,                \
+       .puts   = quad_puts_##n,                \
 };
 
 #endif /* ZOOM2_SERIAL_H */