Skip to contentSkip to conversation

PXA2xx/3xx AC97 Driver(s)

DISCUSSION Mark Brown 3 participants 6 messages Mar 24, 2008 – Apr 2, 2008 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Mark Brown

author
#1 lore raw
Quoted 1 line · Oliver Ford

Is there any work currently under way on an AC97 driver for the PXA3xx?

There is PXA3xx AC97 support present in the ASoC tree:

git://opensource.wolfsonmicro.com/linux-2.6-asoc

It's under the asoc-v2-dev branch at the minute and is probably only done for the ASoC AC97 driver, I'd need to check. The main reason it's only there is that it depends on the ARM architecture changes that you identified (which are also applied on the asoc-v2-dev branch) and it makes life easier to manage the cross-tree changes in only one tree.

All the ARM architecture changes have been submitted and marked as applied in the patch system so should hopefully appear in Linus' kernel early in the 2.6.26 cycle. Once this has happened I will submit the AC97 driver PXA3xx support.

Quoted 2 lines

I want to get the touch screen working on my iPAQ 214, which uses the PXA310. It's a WM97xx chip on the AC97 interface. I'm not really too

I know that there are a number of users currently using the tree for that use case so the asoc-v2-dev branch should hopefully work for you. If you run into trouble please let me know.

Quoted 3 lines

include/asm-arm/arch-pxa/pxa3xx-regs.h). Does the pxa310 require anything special like this or should just setting the cold-reset in the AC97 GCR work?

It also doesn't support the use of interrupts during reset operations, requiring another special case, but I think that's about it.

Quoted 4 lines

The Wolfson Microelectronics open-source page indicates that work is on going with the 3xx driver but there doesn't seem to be anything more than the pxa2xx driver in their source tree. Does anyone know how active / close to producing anything this is?

Like I say, it's there. The changes are fairly straightforward and should be easy to backport to whatever kernel you need - if you need help identifying what needs merging over please just ask.

Quoted 4 lines

More generally, I'm a little confused as to why there is both the standard (sound/arm/pxa2xx-ac97.c) and SoC (sound/soc/pxa/pxa2xx-ac97) driver. Is one of these obsolete now or are they both still in development? If guessing, I'd say the SoC driver is now the one to use

The SoC driver is generally preferable, though it requires a bit more work to use (since you have to write a platform driver to use it). Both are still maintained. SoC offers better power management and support for a wider range of board configurations, especially those that also have non-AC97 interfaces (such as the I2S interface on the WM97xx parts).

Quoted 2 lines

but am not sure. Compiling either gives the warning "'pxa_set_cken' is deprecated". I suspect calling this won't work for the pxa310 since it's

This is also fixed in the patches currently queued in the ARM tree - the drivers have been converted to use the clk_() API.

Quoted 3 lines

clocks are different, but given that I'm booting linux from windows (which will leave the clock on) and don't particularly care about suspend/resume, should not being able to switch it off be a problem?

The cken calls should actually work fine.

#2 lore raw
Quoted 4 lines · Mark Brown
Quoted 2 lines · Oliver Ford

but am not sure. Compiling either gives the warning "'pxa_set_cken' is deprecated". I suspect calling this won't work for the pxa310 since it's

Quoted 8 lines

This is also fixed in the patches currently queued in the ARM tree - the drivers have been converted to use the clk_() API.

Quoted 3 lines

clocks are different, but given that I'm booting linux from windows (which will leave the clock on) and don't particularly care about suspend/resume, should not being able to switch it off be a problem?

The cken calls should actually work fine.

The pxa_set_cken() will not do the right thing for PXA3xx CPUs, which is why that interface is deprecated. If you're building for PXA3 CPUs and you get warnings about pxa_set_cken() that's a sure sign that something's wrong.

author
#3 lore raw
Quoted 4 lines · Russell King - ARM Linux

The pxa_set_cken() will not do the right thing for PXA3xx CPUs, which is why that interface is deprecated. If you're building for PXA3 CPUs and you get warnings about pxa_set_cken() that's a sure sign that something's wrong.

OK, fair enough - in any case, the cken() calls are removed in one of the patches you have pending so they'll be gone before the PXA3xx support is merged.

#4 lore raw
In reply to Mark Brown
Quoted 6 lines · Mark Brown

There is PXA3xx AC97 support present in the ASoC tree:

git://opensource.wolfsonmicro.com/linux-2.6-asoc

It's under the asoc-v2-dev branch at the minute

After a few hours of learning what git is and how to find and fetch that branch I've got it.
I'm now using the whole kernel from there and have applied my patches for the Ipaq214 to it. The Pxa2xx driver (with 3xx support) happily talks down the AC97 bus now. The sound isn't working yet as I've still got to set up the platform definition file properly.

Quoted 5 lines

All the ARM architecture changes have been submitted and marked as applied in the patch system so should hopefully appear in Linus' kernel early in the 2.6.26 cycle. Once this has happened I will submit the AC97 driver PXA3xx support.

The machine no longer reboots out of linux though. I assume there were some changes in 2.6.25-rc4 mainline that aren't in the asoc-v2-dev yet. I will wait for the pxa3xx stuff to be merged into the mainline for this. What version of the mainline kernel is the latest asoc-v2-dev branch based on. (I'm still a little hazy on the git stuff I'm afraid).

Quoted 8 lines
Quoted 3 lines

I want to get the touch screen working on my iPAQ 214, which uses the PXA310. It's a WM97xx chip on the AC97 interface. I'm not really too

I know that there are a number of users currently using the tree for that use case so the asoc-v2-dev branch should hopefully work for you. If you run into trouble please let me know.

The WM97xx touchscreen driver only appears to be in the linux-2.6-touch repository (dev branch, iirc), rather than linux-2.6-asoc where the pxa3xx support is. Since I want both the wm97xx touchscreen and pxa3xx support, is there a simple way I can get the necessary changes in one applied to the other?

Thanks,

Oliver

-------------------------------------------------------------------

List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php
author
#5 lore raw
Quoted 5 lines · Oliver Ford

The machine no longer reboots out of linux though. I assume there were some changes in 2.6.25-rc4 mainline that aren't in the asoc-v2-dev yet. I will wait for the pxa3xx stuff to be merged into the mainline for this. What version of the mainline kernel is the latest asoc-v2-dev branch based on. (I'm still a little hazy on the git stuff I'm afraid).

The last version that was merged in appears to be 2.6.25-rc2 (say 'git log' then search for 'Merge.*v2\.6'). For production use I would recommend going with ASoC v1 at the moment. The PXA3xx support should be straightforward to backport (I wouldn't be suprised if the patches introducing it could just applied against mainline but I've not actually tried yet).

Quoted 9 lines
Quoted 3 lines

I know that there are a number of users currently using the tree for that use case so the asoc-v2-dev branch should hopefully work for you. If you run into trouble please let me know.

The WM97xx touchscreen driver only appears to be in the linux-2.6-touch repository (dev branch, iirc), rather than linux-2.6-asoc where the pxa3xx support is. Since I want both the wm97xx touchscreen and pxa3xx support, is there a simple way I can get the necessary changes in one applied to the other?

You can track both multiple git trees using the remotes feature of git - see git-remote(1) for usage information. For example, this:

	git remote add wolfson-touch \
		git://opensource.wolfsonmicro.com/linux-2.6-touch

will tell git to track the Wolfson touch drivers using the name 'wolfson-touch'. If you do that and then say:

git remote update
git merge wolfson-touch/dev

it will fetch the current state of all remote trees it knows about and then merge the current dev branch of the Wolfson touch drivers git into your current working copy.

The touchscreen drivers and git usage are both rather off-topic for either list, though - probably best to follow up off-list or on linux-input.

author
#6 lore raw
In reply to Mark Brown
Quoted 10 lines · Mark Brown
Quoted 1 line · Oliver Ford

Is there any work currently under way on an AC97 driver for the PXA3xx?

There is PXA3xx AC97 support present in the ASoC tree:

git://opensource.wolfsonmicro.com/linux-2.6-asoc

It's under the asoc-v2-dev branch at the minute and is probably only done for the ASoC AC97 driver, I'd need to check. The main reason it's

I have now merged the PXA3xx AC97 support into ASoC v1 and the non-ASoC PXA AC97 driver. Both drivers onto the dev branch of the above git tree. As I mentioned previously the intention is that they be merged into the mainline during the 2.6.26 cycle.