summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Goger <klaus.goger@theobroma-systems.com>2015-07-27 07:33:12 +0200
committerKlaus Goger <klaus.goger@theobroma-systems.com>2015-07-30 18:44:08 +0200
commit1f6cd13d88c68b584bf18f839e2c089fc307ef2a (patch)
tree139f32112c3d8ad1f096685a68f6eabd593f4e90
parented86cdfef0d5d0e0b30f34729555695ac196b524 (diff)
ARM: sun6i: ifdef board specific init
board specific settings should only be done if the specific board is selected via Kconfig. so we put ifdefs around the relevant sections Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
-rw-r--r--board/sunxi/board.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 3b3cb35415..302a72443b 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -94,6 +94,7 @@ int board_init(void)
asm volatile("mcr p15, 0, %0, c14, c0, 0" : : "r"(24000000));
}
+#ifdef CONFIG_SUNXI_PANGOLIN
sunxi_gpio_set_cfgpin(SUNXI_GPG(10), SUN6I_GPG_USB3);
sunxi_gpio_set_cfgpin(SUNXI_GPG(11), SUN6I_GPG_USB3);
@@ -122,6 +123,7 @@ int board_init(void)
mdelay(30);
gpio_direction_output(SUNXI_GPH(7), 1);
}
+#endif
ret = axp_gpio_init();
if (ret)
@@ -586,12 +588,14 @@ void get_board_serial(struct tag_serialnr *serialnr)
int last_stage_init(void)
{
+#ifdef CONFIG_SUNXI_PANGOLIN
static const char miiname[] = "ethernet@01c30000";
/* enables TXC and RXC skew on the Micrel PHY */
miiphy_write(miiname,0x4,0xd,0x2);
miiphy_write(miiname,0x4,0xe,0x8);
miiphy_write(miiname,0x4,0xd,0x4002);
miiphy_write(miiname,0x4,0xe,0x3de);
+#endif
return 0;
}