summaryrefslogtreecommitdiff
path: root/board/samsung
diff options
context:
space:
mode:
authorJoonyoung Shim <jy0922.shim@samsung.com>2015-01-15 11:45:56 +0900
committerMinkyu Kang <mk7.kang@samsung.com>2015-02-13 17:17:10 +0900
commitaa8e00fab5e65a07c2cae52274946a908805ea60 (patch)
tree2309916e5a3205abcdf476fb7e36adce1d847995 /board/samsung
parenta276172cf32386c211c75638f6bf3c0d59ba03ba (diff)
downloadu-boot-imx-aa8e00fab5e65a07c2cae52274946a908805ea60.zip
u-boot-imx-aa8e00fab5e65a07c2cae52274946a908805ea60.tar.gz
u-boot-imx-aa8e00fab5e65a07c2cae52274946a908805ea60.tar.bz2
samsung: board: support eMMC reset using DT
Some exynos boards require special handling of nRESET_OUT line for eMMC memory to perform complete reboot e.g. Odroid X2/U3/XU3 boards. This will support eMMC reset using DT from reset_misc of samsung common board file. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'board/samsung')
-rw-r--r--board/samsung/common/board.c28
-rw-r--r--board/samsung/odroid/odroid.c8
2 files changed, 28 insertions, 8 deletions
diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c
index 8b4c8e9..da2245f 100644
--- a/board/samsung/common/board.c
+++ b/board/samsung/common/board.c
@@ -355,3 +355,31 @@ int misc_init_r(void)
return 0;
}
#endif
+
+void reset_misc(void)
+{
+ struct gpio_desc gpio = {};
+ int node;
+
+ node = fdt_node_offset_by_compatible(gd->fdt_blob, 0,
+ "samsung,emmc-reset");
+ if (node < 0)
+ return;
+
+ gpio_request_by_name_nodev(gd->fdt_blob, node, "reset-gpio", 0, &gpio,
+ GPIOD_IS_OUT);
+
+ if (dm_gpio_is_valid(&gpio)) {
+ /*
+ * Reset eMMC
+ *
+ * FIXME: Need to optimize delay time. Minimum 1usec pulse is
+ * required by 'JEDEC Standard No.84-A441' (eMMC)
+ * document but real delay time is expected to greater
+ * than 1usec.
+ */
+ dm_gpio_set_value(&gpio, 0);
+ mdelay(10);
+ dm_gpio_set_value(&gpio, 1);
+ }
+}
diff --git a/board/samsung/odroid/odroid.c b/board/samsung/odroid/odroid.c
index e3517f2..306cc0f 100644
--- a/board/samsung/odroid/odroid.c
+++ b/board/samsung/odroid/odroid.c
@@ -503,11 +503,3 @@ int board_usb_init(int index, enum usb_init_type init)
return s3c_udc_probe(&s5pc210_otg_data);
}
#endif
-
-void reset_misc(void)
-{
- /* Reset eMMC*/
- gpio_set_value(EXYNOS4X12_GPIO_K12, 0);
- mdelay(10);
- gpio_set_value(EXYNOS4X12_GPIO_K12, 1);
-}