diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2009-10-30 15:46:14 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2009-11-25 13:21:33 -0500 |
commit | 355fb4e3ea590976819c03070bf2c9491aede258 (patch) | |
tree | 8119acc8e15ec41f0ac11f93d5ffc944a7af8d63 /arch/arm/mach-davinci/usb.c | |
parent | 990c09d5f5b2079e8bf3c6615c78fa5ed2b97147 (diff) |
DaVinci: rename setup_usb() to davinci_setup_usb()
Rename setup_usb() into davinci_setup_usb(). While at it:
- move its declaration from <mach/common.h> to more fitting <mach/usb.h>;
- teach it to handle values of the 'mA' parameter greater than 510 and thus
pass 1000 instead of 500 for the power switches capable of sourcing over 1 A;
- teach it to handle odd values of the 'potpgt_ms' parameter...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/usb.c')
-rw-r--r-- | arch/arm/mach-davinci/usb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/mach-davinci/usb.c b/arch/arm/mach-davinci/usb.c index 31eec87dc78f..fe20cc2e8385 100644 --- a/arch/arm/mach-davinci/usb.c +++ b/arch/arm/mach-davinci/usb.c | |||
@@ -83,10 +83,10 @@ static struct platform_device usb_dev = { | |||
83 | .num_resources = ARRAY_SIZE(usb_resources), | 83 | .num_resources = ARRAY_SIZE(usb_resources), |
84 | }; | 84 | }; |
85 | 85 | ||
86 | void __init setup_usb(unsigned mA, unsigned potpgt_msec) | 86 | void __init davinci_setup_usb(unsigned mA, unsigned potpgt_ms) |
87 | { | 87 | { |
88 | usb_data.power = mA / 2; | 88 | usb_data.power = mA > 510 ? 255 : mA / 2; |
89 | usb_data.potpgt = potpgt_msec / 2; | 89 | usb_data.potpgt = (potpgt_ms + 1) / 2; |
90 | 90 | ||
91 | if (cpu_is_davinci_dm646x()) { | 91 | if (cpu_is_davinci_dm646x()) { |
92 | /* Override the defaults as DM6467 uses different IRQs. */ | 92 | /* Override the defaults as DM6467 uses different IRQs. */ |
@@ -100,7 +100,7 @@ void __init setup_usb(unsigned mA, unsigned potpgt_msec) | |||
100 | 100 | ||
101 | #else | 101 | #else |
102 | 102 | ||
103 | void __init setup_usb(unsigned mA, unsigned potpgt_msec) | 103 | void __init davinci_setup_usb(unsigned mA, unsigned potpgt_ms) |
104 | { | 104 | { |
105 | } | 105 | } |
106 | 106 | ||