2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 04:34:11 +08:00
linux-next/sound/soc/pxa
Eric Miao 7053acbd78 [ARM] 4304/1: removes the unnecessary bit number from CKENnn_XXXX
This patch removes the unnecessary bit number from CKENnn_XXXX
definitions for PXA, so that

	CKEN0_PWM0 --> CKEN_PWM0
	CKEN1_PWM1 --> CKEN_PWM1
	...
	CKEN24_CAMERA --> CKEN_CAMERA

The reasons for the change of these defitions are:

1. they do not scale - they are currently valid for pxa2xx, but
definitely not valid for pxa3xx, e.g., pxa3xx has bit 3 for camera
instead of bit 24

2. they are unnecessary - the peripheral name within the definition
has already announced its usage, we don't need those bit numbers
to know which peripheral we are going to enable/disable clock for

3. they are inconvenient - think about this: a driver programmer
for pxa has to remember which bit in the CKEN register to turn
on/off

Another change in the patch is to make the definitions equal to its
clock bit index, so that

   #define CKEN_CAMERA  (24)

instead of

   #define CKEN_CAMERA  (1 << 24)

this change, however, will add a run-time bit shift operation in
pxa_set_cken(), but the benefit of this change is that it scales
when bit index exceeds 32, e.g., pxa3xx has two registers CKENA
and CKENB, totally 64 bit for this, suppose CAMERA clock enabling
bit is CKENB:10, one can simply define CKEN_CAMERA to be (32 + 10)
and so that pxa_set_cken() need minimum change to adapt to that.

Signed-off-by: eric miao <eric.y.miao@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-04-21 23:14:01 +01:00
..
corgi.c [ALSA] soc - ASoC Sharp corgi machine 2007-02-09 09:03:48 +01:00
Kconfig [ALSA] soc - Fix dependencies in Kconfig files 2007-03-14 08:24:16 +01:00
Makefile [ALSA] ASoC pxa2xx build support 2007-02-09 09:00:50 +01:00
poodle.c [ALSA] soc - ASoC 0.13 Sharp poodle machine 2007-02-09 09:03:51 +01:00
pxa2xx-ac97.c [ARM] 4304/1: removes the unnecessary bit number from CKENnn_XXXX 2007-04-21 23:14:01 +01:00
pxa2xx-ac97.h [ALSA] soc - ASoC 0.13 pxa2xx AC97 driver 2007-02-09 09:03:46 +01:00
pxa2xx-i2s.c [ARM] 4304/1: removes the unnecessary bit number from CKENnn_XXXX 2007-04-21 23:14:01 +01:00
pxa2xx-i2s.h [ALSA] soc - ASoC 0.13 pxa2xx i2s driver 2007-02-09 09:03:45 +01:00
pxa2xx-pcm.c [ALSA] soc - ASoC 0.13 pxa2xx DMA 2007-02-09 09:03:47 +01:00
pxa2xx-pcm.h [ALSA] soc - ASoC 0.13 pxa2xx DMA 2007-02-09 09:03:47 +01:00
spitz.c [ALSA] soc - ASoC 0.13 spitz machine 2007-02-09 09:03:49 +01:00
tosa.c [ALSA] soc - ASoC 0.13 Sharp tosa machine 2007-02-09 09:03:50 +01:00