summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorMateusz Zalega <m.zalega@samsung.com>2014-04-30 13:07:48 +0200
committerLukasz Majewski <l.majewski@samsung.com>2014-05-05 08:00:28 +0200
commit75504e9592745021006cb8905b5ff5a51d9d1cb3 (patch)
treed3f70f43a6eb464de67b84664d068f819fb01d9a /board
parent6b423b752b24bf69962821754314418621fc71cc (diff)
usb: dfu: fix boards wo USB cable detection
Former usb_cable_connected() patch broke compilation of boards which do not support this feature. I've renamed usb_cable_connected() to g_dnl_usb_cable_connected() and added its default implementation to gadget downloader driver code. There's only one driver of this kind and it's unlikely there'll be another, so there's no point in keeping it in /common. Previously this function was declared in usb.h. I've moved it, since it's more appropriate to keep it in g_dnl.h - usb.h seems to be intended for USB host implementation. Existing code, confronted with default -EOPNOTSUPP return value, continues as if the cable was connected. CONFIG_USB_CABLE_CHECK was removed. Change-Id: Ib9198621adee2811b391c64512f14646cefd0369 Signed-off-by: Mateusz Zalega <m.zalega@samsung.com> Acked-by: Marek Vasut <marex@denx.de> Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Diffstat (limited to 'board')
-rw-r--r--board/samsung/origen/origen.c7
-rw-r--r--board/samsung/trats/trats.c4
-rw-r--r--board/samsung/trats2/trats2.c4
-rw-r--r--board/samsung/universal_c210/universal.c7
4 files changed, 2 insertions, 20 deletions
diff --git a/board/samsung/origen/origen.c b/board/samsung/origen/origen.c
index d502f02d3d..a539267a1c 100644
--- a/board/samsung/origen/origen.c
+++ b/board/samsung/origen/origen.c
@@ -30,13 +30,6 @@ int board_usb_init(int index, enum usb_init_type init)
return 0;
}
-#ifdef CONFIG_USB_CABLE_CHECK
-int usb_cable_connected(void)
-{
- return 0;
-}
-#endif
-
#ifdef CONFIG_BOARD_EARLY_INIT_F
int exynos_early_init_f(void)
{
diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
index 7c79e7b73a..ab0ad1d650 100644
--- a/board/samsung/trats/trats.c
+++ b/board/samsung/trats/trats.c
@@ -430,8 +430,7 @@ int board_usb_init(int index, enum usb_init_type init)
return s3c_udc_probe(&s5pc210_otg_data);
}
-#ifdef CONFIG_USB_CABLE_CHECK
-int usb_cable_connected(void)
+int g_dnl_board_usb_cable_connected(void)
{
struct pmic *muic = pmic_get("MAX8997_MUIC");
if (!muic)
@@ -440,7 +439,6 @@ int usb_cable_connected(void)
return !!muic->chrg->chrg_type(muic);
}
#endif
-#endif
static void pmic_reset(void)
{
diff --git a/board/samsung/trats2/trats2.c b/board/samsung/trats2/trats2.c
index f558ef97a9..47095252a7 100644
--- a/board/samsung/trats2/trats2.c
+++ b/board/samsung/trats2/trats2.c
@@ -312,8 +312,7 @@ int board_usb_init(int index, enum usb_init_type init)
return s3c_udc_probe(&s5pc210_otg_data);
}
-#ifdef CONFIG_USB_CABLE_CHECK
-int usb_cable_connected(void)
+int g_dnl_board_usb_cable_connected(void)
{
struct pmic *muic = pmic_get("MAX77693_MUIC");
if (!muic)
@@ -322,7 +321,6 @@ int usb_cable_connected(void)
return !!muic->chrg->chrg_type(muic);
}
#endif
-#endif
static int pmic_init_max77686(void)
{
diff --git a/board/samsung/universal_c210/universal.c b/board/samsung/universal_c210/universal.c
index f9d71b617d..8e49195fe1 100644
--- a/board/samsung/universal_c210/universal.c
+++ b/board/samsung/universal_c210/universal.c
@@ -197,13 +197,6 @@ int board_usb_init(int index, enum usb_init_type init)
return s3c_udc_probe(&s5pc210_otg_data);
}
-#ifdef CONFIG_USB_CABLE_CHECK
-int usb_cable_connected(void)
-{
- return 0;
-}
-#endif
-
int exynos_early_init_f(void)
{
wdt_stop();