]> Git Repo - J-u-boot.git/blame - board/Marvell/db-88f6281-bp/db-88f6281-bp.c
common: Drop init.h from common header
[J-u-boot.git] / board / Marvell / db-88f6281-bp / db-88f6281-bp.c
CommitLineData
d55254ab
CP
1// SPDX-License-Identifier: GPL-2.0+
2
3#include <common.h>
691d719d 4#include <init.h>
5e6267af 5#include <net.h>
d55254ab
CP
6#include <linux/io.h>
7#include <miiphy.h>
8#include <netdev.h>
9#include <asm/arch/cpu.h>
10#include <asm/arch/soc.h>
11#include <asm/arch/mpp.h>
12#include <asm/arch/gpio.h>
13
14#define DB_88F6281_OE_LOW ~(BIT(7))
15#define DB_88F6281_OE_HIGH ~(BIT(15) | BIT(14) | BIT(13) | BIT(4))
16#define DB_88F6281_OE_VAL_LOW BIT(7)
17#define DB_88F6281_OE_VAL_HIGH 0
18
19DECLARE_GLOBAL_DATA_PTR;
20
21int board_early_init_f(void)
22{
23 mvebu_config_gpio(DB_88F6281_OE_VAL_LOW,
24 DB_88F6281_OE_VAL_HIGH,
25 DB_88F6281_OE_LOW, DB_88F6281_OE_HIGH);
26
27 /* Multi-Purpose Pins Functionality configuration */
28 static const u32 kwmpp_config[] = {
29#ifdef CONFIG_CMD_NAND
30 MPP0_NF_IO2,
31 MPP1_NF_IO3,
32 MPP2_NF_IO4,
33 MPP3_NF_IO5,
34#else
35 MPP0_SPI_SCn,
36 MPP1_SPI_MOSI,
37 MPP2_SPI_SCK,
38 MPP3_SPI_MISO,
39#endif
40 MPP4_NF_IO6,
41 MPP5_NF_IO7,
42 MPP6_SYSRST_OUTn,
43 MPP7_GPO,
44 MPP8_TW_SDA,
45 MPP9_TW_SCK,
46 MPP10_UART0_TXD,
47 MPP11_UART0_RXD,
48 MPP12_SD_CLK,
49 MPP13_SD_CMD,
50 MPP14_SD_D0,
51 MPP15_SD_D1,
52 MPP16_SD_D2,
53 MPP17_SD_D3,
54 MPP18_NF_IO0,
55 MPP19_NF_IO1,
56 MPP20_SATA1_ACTn,
57 MPP21_SATA0_ACTn,
58 MPP22_GPIO,
59 MPP23_GPIO,
60 MPP24_GPIO,
61 MPP25_GPIO,
62 MPP26_GPIO,
63 MPP27_GPIO,
64 MPP28_GPIO,
65 MPP29_GPIO,
66 MPP30_GPIO,
67 MPP31_GPIO,
68 MPP32_GPIO,
69 MPP33_GPIO,
70 MPP34_GPIO,
71 MPP35_GPIO,
72 MPP36_GPIO,
73 MPP37_GPIO,
74 MPP38_GPIO,
75 MPP39_GPIO,
76 MPP40_GPIO,
77 MPP41_GPIO,
78 MPP42_GPIO,
79 MPP43_GPIO,
80 MPP44_GPIO,
81 MPP45_GPIO,
82 MPP46_GPIO,
83 MPP47_GPIO,
84 MPP48_GPIO,
85 MPP49_GPIO,
86 0
87 };
88 kirkwood_mpp_conf(kwmpp_config, NULL);
89
90 return 0;
91}
92
93int board_init(void)
94{
95 gd->bd->bi_boot_params = mvebu_sdram_bar(0) + 0x100;
96
97 return 0;
98}
99
100#ifdef CONFIG_RESET_PHY_R
101/* automatically defined by kirkwood config.h */
102void reset_phy(void)
103{
104}
105#endif
This page took 0.088 seconds and 4 git commands to generate.