diff options
author | Eric Miao <eric.y.miao@gmail.com> | 2007-04-04 23:07:20 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-04-21 18:14:01 -0400 |
commit | 7053acbd78336abf5d4bc3d8a875a03624cfb83f (patch) | |
tree | 76dff22217a91d40c1d44292c0454d31cad55f15 /include/asm-arm/arch-pxa/pxa-regs.h | |
parent | a79220b7633b3926a9bd3527bdac3f04dbe6845c (diff) |
[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>
Diffstat (limited to 'include/asm-arm/arch-pxa/pxa-regs.h')
-rw-r--r-- | include/asm-arm/arch-pxa/pxa-regs.h | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h index 139c9d95481..dbcc9298b0c 100644 --- a/include/asm-arm/arch-pxa/pxa-regs.h +++ b/include/asm-arm/arch-pxa/pxa-regs.h | |||
@@ -1801,35 +1801,35 @@ | |||
1801 | #define CCCR_M_MASK 0x0060 /* Memory Frequency to Run Mode Frequency Multiplier */ | 1801 | #define CCCR_M_MASK 0x0060 /* Memory Frequency to Run Mode Frequency Multiplier */ |
1802 | #define CCCR_L_MASK 0x001f /* Crystal Frequency to Memory Frequency Multiplier */ | 1802 | #define CCCR_L_MASK 0x001f /* Crystal Frequency to Memory Frequency Multiplier */ |
1803 | 1803 | ||
1804 | #define CKEN24_CAMERA (1 << 24) /* Camera Interface Clock Enable */ | 1804 | #define CKEN_CAMERA (24) /* Camera Interface Clock Enable */ |
1805 | #define CKEN23_SSP1 (1 << 23) /* SSP1 Unit Clock Enable */ | 1805 | #define CKEN_SSP1 (23) /* SSP1 Unit Clock Enable */ |
1806 | #define CKEN22_MEMC (1 << 22) /* Memory Controller Clock Enable */ | 1806 | #define CKEN_MEMC (22) /* Memory Controller Clock Enable */ |
1807 | #define CKEN21_MEMSTK (1 << 21) /* Memory Stick Host Controller */ | 1807 | #define CKEN_MEMSTK (21) /* Memory Stick Host Controller */ |
1808 | #define CKEN20_IM (1 << 20) /* Internal Memory Clock Enable */ | 1808 | #define CKEN_IM (20) /* Internal Memory Clock Enable */ |
1809 | #define CKEN19_KEYPAD (1 << 19) /* Keypad Interface Clock Enable */ | 1809 | #define CKEN_KEYPAD (19) /* Keypad Interface Clock Enable */ |
1810 | #define CKEN18_USIM (1 << 18) /* USIM Unit Clock Enable */ | 1810 | #define CKEN_USIM (18) /* USIM Unit Clock Enable */ |
1811 | #define CKEN17_MSL (1 << 17) /* MSL Unit Clock Enable */ | 1811 | #define CKEN_MSL (17) /* MSL Unit Clock Enable */ |
1812 | #define CKEN16_LCD (1 << 16) /* LCD Unit Clock Enable */ | 1812 | #define CKEN_LCD (16) /* LCD Unit Clock Enable */ |
1813 | #define CKEN15_PWRI2C (1 << 15) /* PWR I2C Unit Clock Enable */ | 1813 | #define CKEN_PWRI2C (15) /* PWR I2C Unit Clock Enable */ |
1814 | #define CKEN14_I2C (1 << 14) /* I2C Unit Clock Enable */ | 1814 | #define CKEN_I2C (14) /* I2C Unit Clock Enable */ |
1815 | #define CKEN13_FICP (1 << 13) /* FICP Unit Clock Enable */ | 1815 | #define CKEN_FICP (13) /* FICP Unit Clock Enable */ |
1816 | #define CKEN12_MMC (1 << 12) /* MMC Unit Clock Enable */ | 1816 | #define CKEN_MMC (12) /* MMC Unit Clock Enable */ |
1817 | #define CKEN11_USB (1 << 11) /* USB Unit Clock Enable */ | 1817 | #define CKEN_USB (11) /* USB Unit Clock Enable */ |
1818 | #define CKEN10_ASSP (1 << 10) /* ASSP (SSP3) Clock Enable */ | 1818 | #define CKEN_ASSP (10) /* ASSP (SSP3) Clock Enable */ |
1819 | #define CKEN10_USBHOST (1 << 10) /* USB Host Unit Clock Enable */ | 1819 | #define CKEN_USBHOST (10) /* USB Host Unit Clock Enable */ |
1820 | #define CKEN9_OSTIMER (1 << 9) /* OS Timer Unit Clock Enable */ | 1820 | #define CKEN_OSTIMER (9) /* OS Timer Unit Clock Enable */ |
1821 | #define CKEN9_NSSP (1 << 9) /* NSSP (SSP2) Clock Enable */ | 1821 | #define CKEN_NSSP (9) /* NSSP (SSP2) Clock Enable */ |
1822 | #define CKEN8_I2S (1 << 8) /* I2S Unit Clock Enable */ | 1822 | #define CKEN_I2S (8) /* I2S Unit Clock Enable */ |
1823 | #define CKEN7_BTUART (1 << 7) /* BTUART Unit Clock Enable */ | 1823 | #define CKEN_BTUART (7) /* BTUART Unit Clock Enable */ |
1824 | #define CKEN6_FFUART (1 << 6) /* FFUART Unit Clock Enable */ | 1824 | #define CKEN_FFUART (6) /* FFUART Unit Clock Enable */ |
1825 | #define CKEN5_STUART (1 << 5) /* STUART Unit Clock Enable */ | 1825 | #define CKEN_STUART (5) /* STUART Unit Clock Enable */ |
1826 | #define CKEN4_HWUART (1 << 4) /* HWUART Unit Clock Enable */ | 1826 | #define CKEN_HWUART (4) /* HWUART Unit Clock Enable */ |
1827 | #define CKEN4_SSP3 (1 << 4) /* SSP3 Unit Clock Enable */ | 1827 | #define CKEN_SSP3 (4) /* SSP3 Unit Clock Enable */ |
1828 | #define CKEN3_SSP (1 << 3) /* SSP Unit Clock Enable */ | 1828 | #define CKEN_SSP (3) /* SSP Unit Clock Enable */ |
1829 | #define CKEN3_SSP2 (1 << 3) /* SSP2 Unit Clock Enable */ | 1829 | #define CKEN_SSP2 (3) /* SSP2 Unit Clock Enable */ |
1830 | #define CKEN2_AC97 (1 << 2) /* AC97 Unit Clock Enable */ | 1830 | #define CKEN_AC97 (2) /* AC97 Unit Clock Enable */ |
1831 | #define CKEN1_PWM1 (1 << 1) /* PWM1 Clock Enable */ | 1831 | #define CKEN_PWM1 (1) /* PWM1 Clock Enable */ |
1832 | #define CKEN0_PWM0 (1 << 0) /* PWM0 Clock Enable */ | 1832 | #define CKEN_PWM0 (0) /* PWM0 Clock Enable */ |
1833 | 1833 | ||
1834 | #define OSCC_OON (1 << 1) /* 32.768kHz OON (write-once only bit) */ | 1834 | #define OSCC_OON (1 << 1) /* 32.768kHz OON (write-once only bit) */ |
1835 | #define OSCC_OOK (1 << 0) /* 32.768kHz OOK (read-only bit) */ | 1835 | #define OSCC_OOK (1 << 0) /* 32.768kHz OOK (read-only bit) */ |