]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/freescale/mx23evk/mx23evk.c
mxs_gpio: correctly use the GPIO API
[karo-tx-uboot.git] / board / freescale / mx23evk / mx23evk.c
index d25e2b37ce2d1410154a8a21a174308195b6ad7c..a3fe4c175c6cf181b4c0c118bed1c83cd97396e8 100644 (file)
@@ -9,18 +9,7 @@
  * Copyright (C) 2011 Marek Vasut <marek.vasut@gmail.com>
  * on behalf of DENX Software Engineering GmbH
  *
- * 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.
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -44,10 +33,10 @@ int board_early_init_f(void)
        mxs_set_sspclk(MXC_SSPCLK0, 96000, 0);
 
        /* Power on LCD */
-       gpio_direction_output(MX23_PAD_LCD_RESET__GPIO_1_18, 1);
+       gpio_direction_output(MXS_PAD_TO_GPIO(MX23_PAD_LCD_RESET__GPIO_1_18), 1);
 
        /* Set contrast to maximum */
-       gpio_direction_output(MX23_PAD_PWM2__GPIO_1_28, 1);
+       gpio_direction_output(MXS_PAD_TO_GPIO(MX23_PAD_PWM2__GPIO_1_28), 1);
 
        return 0;
 }
@@ -73,16 +62,16 @@ static int mx23evk_mmc_wp(int id)
                return 1;
        }
 
-       return gpio_get_value(MX23_PAD_PWM4__GPIO_1_30);
+       return gpio_get_value(MXS_PAD_TO_GPIO(MX23_PAD_PWM4__GPIO_1_30));
 }
 
 int board_mmc_init(bd_t *bis)
 {
        /* Configure WP as input */
-       gpio_direction_input(MX23_PAD_PWM4__GPIO_1_30);
+       gpio_direction_input(MXS_PAD_TO_GPIO(MX23_PAD_PWM4__GPIO_1_30));
 
        /* Configure MMC0 Power Enable */
-       gpio_direction_output(MX23_PAD_PWM3__GPIO_1_29, 0);
+       gpio_direction_output(MXS_PAD_TO_GPIO(MX23_PAD_PWM3__GPIO_1_29), 0);
 
        return mxsmmc_initialize(bis, 0, mx23evk_mmc_wp, NULL);
 }