Re: [PATCH 43/90] ARM: OMAP: TUSB EVM init

Randy Dunlap
2007-04-04T18:43:10Z

On Wed, 4 Apr 2007 14:05:22 -0400 Tony Lindgren wrote:

> From: David Brownell <dbrownell@users.sourceforge.net>
>
> Add init support for the TUSB6010 EVM board, as connected to H4.
>
> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
> arch/arm/mach-omap2/usb-tusb6010.c | 333 ++++++++++++++++++++++++++++++++++++
> 1 files changed, 333 insertions(+), 0 deletions(-)

...

externs should be in some header file.

> +extern unsigned long gpmc_get_fclk_period(void);
> +
> +/* tusb driver calls this when it changes the chip's clocking */
> +int tusb6010_platform_retime(unsigned is_refclk)
> +{
> + static const char error[] =
> + KERN_ERR "tusb6010 %s retime error %d\n";
> +
> + unsigned fclk_ps = gpmc_get_fclk_period();
> + unsigned sysclk_ps;
> + int status;
> +
> + if (!refclk_psec)
> + return -ENODEV;
> +
> + sysclk_ps = is_refclk ? refclk_psec : TUSB6010_OSCCLK_60;
> +
> + status = tusb_set_async_mode(sysclk_ps, fclk_ps);
> + if (status < 0) {
> + printk(error, "async", status);
> + goto done;
> + }
> + status = tusb_set_sync_mode(sysclk_ps, fclk_ps);
> + if (status < 0)
> + printk(error, "sync", status);
> +done:
> + return status;
> +}
> +EXPORT_SYMBOL_GPL(tusb6010_platform_retime);

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***