]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - board/ronetix/pm9g45/pm9g45.c
net: Remove the bd* parameter from net stack functions
[karo-tx-uboot.git] / board / ronetix / pm9g45 / pm9g45.c
index f3374a44298af5fb8180c895cd36221dad1d6157..efc4133bbfe9d78f6048781efba3340dc186982d 100644 (file)
@@ -5,31 +5,16 @@
  * Ronetix GmbH <www.ronetix.at>
  *
  * (C) Copyright 2007-2008
- * Stelian Pop <stelian.pop@leadtechdesign.com>
+ * Stelian Pop <stelian@popies.net>
  * Lead Tech Design <www.leadtechdesign.com>
  *
- * 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>
-#include <asm/sizes.h>
+#include <linux/sizes.h>
 #include <asm/io.h>
+#include <asm/gpio.h>
 #include <asm/arch/at91sam9_smc.h>
 #include <asm/arch/at91_common.h>
 #include <asm/arch/at91_pmc.h>
@@ -82,11 +67,11 @@ static void pm9g45_nand_hw_init(void)
 
 #ifdef CONFIG_SYS_NAND_READY_PIN
        /* Configure RDY/BSY */
-       at91_set_pio_input(CONFIG_SYS_NAND_READY_PIN, 1);
+       gpio_direction_input(CONFIG_SYS_NAND_READY_PIN);
 #endif
 
        /* Enable NandFlash */
-       at91_set_pio_output(CONFIG_SYS_NAND_ENABLE_PIN, 1);
+       gpio_direction_output(CONFIG_SYS_NAND_ENABLE_PIN, 1);
 }
 #endif
 
@@ -127,24 +112,28 @@ static void pm9g45_macb_hw_init(void)
 }
 #endif
 
-int board_init(void)
+int board_early_init_f(void)
 {
        struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
 
-       /* Enable Ctrlc */
-       console_init_f();
-
+       /* Enable clocks for all PIOs */
        writel((1 << ATMEL_ID_PIOA) |
                (1 << ATMEL_ID_PIOB) |
                (1 << ATMEL_ID_PIOC) |
                (1 << ATMEL_ID_PIODE), &pmc->pcer);
 
+       at91_seriald_hw_init();
+
+       return 0;
+}
+
+int board_init(void)
+{
        /* arch number of AT91SAM9M10G45EK-Board */
        gd->bd->bi_arch_number = MACH_TYPE_PM9G45;
        /* adress of boot parameters */
        gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
 
-       at91_seriald_hw_init();
 #ifdef CONFIG_CMD_NAND
        pm9g45_nand_hw_init();
 #endif
@@ -177,7 +166,7 @@ void reset_phy(void)
         * Initialize ethernet HW addr prior to starting Linux,
         * needed for nfsroot
         */
-       eth_init(gd->bd);
+       eth_init();
 #endif
 }
 #endif