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>
This commit is contained in:
parent
990c09d5f5
commit
355fb4e3ea
7 changed files with 14 additions and 16 deletions
|
@ -83,10 +83,10 @@ static struct platform_device usb_dev = {
|
|||
.num_resources = ARRAY_SIZE(usb_resources),
|
||||
};
|
||||
|
||||
void __init setup_usb(unsigned mA, unsigned potpgt_msec)
|
||||
void __init davinci_setup_usb(unsigned mA, unsigned potpgt_ms)
|
||||
{
|
||||
usb_data.power = mA / 2;
|
||||
usb_data.potpgt = potpgt_msec / 2;
|
||||
usb_data.power = mA > 510 ? 255 : mA / 2;
|
||||
usb_data.potpgt = (potpgt_ms + 1) / 2;
|
||||
|
||||
if (cpu_is_davinci_dm646x()) {
|
||||
/* Override the defaults as DM6467 uses different IRQs. */
|
||||
|
@ -100,7 +100,7 @@ void __init setup_usb(unsigned mA, unsigned potpgt_msec)
|
|||
|
||||
#else
|
||||
|
||||
void __init setup_usb(unsigned mA, unsigned potpgt_msec)
|
||||
void __init davinci_setup_usb(unsigned mA, unsigned potpgt_ms)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue