Re: [RFC 2.6.26-rc3 06/10] gumstix: conversion to MFP support and add bluetooth support
flat view
From: Eric Miao <hidden>
Date: 2008-06-16 02:22:00
Jaya Kumar wrote:
On Thu, Jun 12, 2008 at 10:01 PM, Eric Miao [off-list ref] wrote:quoted
Jaya Kumar wrote: I'd suggest we use #if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE) so that even when PXA MMCI is built as a module, the platform data is still available for later bind. Same below to the BT.Yup, there are problems with my assumptions there. I see Russell's point that gpio setup shouldn't depend on whether the driver is enabled or not. I wasn't sure if all gumstix-F's had MMC and BT on those gpio's so I tried to hedge that with CONFIG options. It looks like it is safe to remove the CONFIG so I'll change that over.quoted
The 32KHz oscillator should be on by default, so I'm thinking of: 1. remove this clock source or 2. enable/disable the clk by enable/disable the pin configuration (i.e. switch between GPIO12_32KHz and GPIO12_GPIO)Ok. I'll go read up and try to solve this. I think I put the enable in there because it initially didn't work on my setup. I saw that the gumstix bluetooth startup script S30bluetooth was manually tweaking that using the pxaregs proc_gpio patch. echo -n "Starting 32kHz clock..." /usr/sbin/pxaregs OSCC_OON 1 while /usr/sbin/pxaregs OSCC_OOK | tail -n 1 | grep -q -v 1;do echo -n '.' sleep 1 done echo "Settled" From the gumstix faq: http://docwiki.gumstix.org/Frequently_asked_questions/Bluetooth The new bluetooth module needs a 32Khz clock signal to be fed to the module from the PXA by setting one of the GPIO lines to a special alt function mode, and enabling the OSCC on the PXA. This is done properly by the u-boot in the latest buildroot revisions, (as of Jan 27, 2006) and double-checked by the latest bluetooth startup scripts in the buildroot using pxaregs to ensure that the clock is in fact ticking before attempting to talk to the BT module.
OK, so I assume with the latest u-boot (I mean after Jan 27, 2006), it should boot up with 32KHz timer enabled, and you don't really need to enable OSCC by default, right? Or would you be kind enough to test that out? You see, I'm a bit conservative to add clk support for 32KHz timer in the kernel, as that should be started earlier, most suitable place will be in the boot loader. If this doesn't work, we have to work it out in another way.
quoted
As said, the 32K timer should really be started on the very begining, I'd prefer a some kind of warning here if OSCC_OOK isn't set.Ok, I'll fix this.quoted
quoted
+ +static void clk_32k_disable(struct clk *clk) +{ + OSCC &= ~OSCC_OON; +} +The 32K timer cannot be disabled once started, until a power-on or hardware reset occurs.Ok, I'll take this out. Thanks, jaya
------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php