2 * Copyright (C) 2012 Samsung Electronics
3 * Donghwa Lee <dh09.lee@samsung.com>
5 * SPDX-License-Identifier: GPL-2.0+
10 #include <asm/arch/system.h>
12 static void exynos5_set_usbhost_mode(unsigned int mode)
14 struct exynos5_sysreg *sysreg =
15 (struct exynos5_sysreg *)samsung_get_base_sysreg();
17 /* Setting USB20PHY_CONFIG register to USB 2.0 HOST link */
18 if (mode == USB20_PHY_CFG_HOST_LINK_EN) {
19 setbits_le32(&sysreg->usb20phy_cfg,
20 USB20_PHY_CFG_HOST_LINK_EN);
22 clrbits_le32(&sysreg->usb20phy_cfg,
23 USB20_PHY_CFG_HOST_LINK_EN);
27 void set_usbhost_mode(unsigned int mode)
30 exynos5_set_usbhost_mode(mode);
33 static void exynos4_set_system_display(void)
35 struct exynos4_sysreg *sysreg =
36 (struct exynos4_sysreg *)samsung_get_base_sysreg();
40 * system register path set
44 cfg = readl(&sysreg->display_ctrl);
46 writel(cfg, &sysreg->display_ctrl);
49 static void exynos5_set_system_display(void)
51 struct exynos5_sysreg *sysreg =
52 (struct exynos5_sysreg *)samsung_get_base_sysreg();
56 * system register path set
60 cfg = readl(&sysreg->disp1blk_cfg);
62 writel(cfg, &sysreg->disp1blk_cfg);
65 void set_system_display_ctrl(void)
68 exynos4_set_system_display();
70 exynos5_set_system_display();