lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091229192407.GA3512@atomide.com>
Date:	Tue, 29 Dec 2009 11:24:07 -0800
From:	Tony Lindgren <tony@...mide.com>
To:	Luke-Jr <luke@...hjr.org>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
	"Balbi Felipe (Nokia-D/Helsinki)" <felipe.balbi@...ia.com>,
	Kalle Valo <kalle.valo@....fi>
Subject: Re: [PATCH] OMAP2: add USB platform data and initialization for
 Nokia N800 and N810

Hi,

* Luke-Jr <luke@...hjr.org> [091228 23:51]:
> Add platform data and initialization for USB on Nokia N800 and N810 devices
> via the TUSB6010 chipset.
> 
> Tested on Nokia N810 in Linux-OMAP tree. Mainline is not bootable yet.
> 
> Signed-off-by: Luke Dashjr <luke_linuxkern@...hjr.org>
> ---
>  arch/arm/mach-omap2/Kconfig          |    5 +
>  arch/arm/mach-omap2/Makefile         |    1 +
>  arch/arm/mach-omap2/board-n8x0-usb.c |  173 ++++++++++++++++++++++++++++++++++
>  arch/arm/mach-omap2/board-n8x0.c     |    8 ++
>  4 files changed, 187 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/mach-omap2/board-n8x0-usb.c
> 

<snip>

> diff --git a/arch/arm/mach-omap2/board-n8x0-usb.c b/arch/arm/mach-omap2/board-n8x0-usb.c
> new file mode 100644
> index 0000000..2254ebd
> --- /dev/null
> +++ b/arch/arm/mach-omap2/board-n8x0-usb.c

<snip>

> +static int		osc_ck_on;
> +
> +static int tusb_set_clock(struct clk *osc_ck, int state)
> +{
> +	if (state) {
> +		if (osc_ck_on > 0)
> +			return -ENODEV;
> +
> +		clk_enable(osc_ck);
> +		osc_ck_on = 1;
> +	} else {
> +		if (osc_ck_on == 0)
> +			return -ENODEV;
> +
> +		clk_disable(osc_ck);
> +		osc_ck_on = 0;
> +	}
> +
> +	return 0;
> +}

Great. The comment from Russell earlier was that we should be now using
clkdev to do things like this and get rid of the _set_clock functions.
In musb_core.c are already using the clk directly if set_clock is NULL.

Can you try the patch below? If it works, just merge it into your
patch.

Regards,

Tony


View attachment "tusb-clkdev.patch" of type "text/x-diff" (2551 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ