aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorEric Miao <eric.y.miao@gmail.com>2007-04-04 23:07:20 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-04-21 18:14:01 -0400
commit7053acbd78336abf5d4bc3d8a875a03624cfb83f (patch)
tree76dff22217a91d40c1d44292c0454d31cad55f15 /drivers/serial
parenta79220b7633b3926a9bd3527bdac3f04dbe6845c (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 'drivers/serial')
-rw-r--r--drivers/serial/pxa.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c
index d403aaa55092..e9c6cb391a23 100644
--- a/drivers/serial/pxa.c
+++ b/drivers/serial/pxa.c
@@ -717,7 +717,7 @@ struct uart_ops serial_pxa_pops = {
717static struct uart_pxa_port serial_pxa_ports[] = { 717static struct uart_pxa_port serial_pxa_ports[] = {
718 { /* FFUART */ 718 { /* FFUART */
719 .name = "FFUART", 719 .name = "FFUART",
720 .cken = CKEN6_FFUART, 720 .cken = CKEN_FFUART,
721 .port = { 721 .port = {
722 .type = PORT_PXA, 722 .type = PORT_PXA,
723 .iotype = UPIO_MEM, 723 .iotype = UPIO_MEM,
@@ -731,7 +731,7 @@ static struct uart_pxa_port serial_pxa_ports[] = {
731 }, 731 },
732 }, { /* BTUART */ 732 }, { /* BTUART */
733 .name = "BTUART", 733 .name = "BTUART",
734 .cken = CKEN7_BTUART, 734 .cken = CKEN_BTUART,
735 .port = { 735 .port = {
736 .type = PORT_PXA, 736 .type = PORT_PXA,
737 .iotype = UPIO_MEM, 737 .iotype = UPIO_MEM,
@@ -745,7 +745,7 @@ static struct uart_pxa_port serial_pxa_ports[] = {
745 }, 745 },
746 }, { /* STUART */ 746 }, { /* STUART */
747 .name = "STUART", 747 .name = "STUART",
748 .cken = CKEN5_STUART, 748 .cken = CKEN_STUART,
749 .port = { 749 .port = {
750 .type = PORT_PXA, 750 .type = PORT_PXA,
751 .iotype = UPIO_MEM, 751 .iotype = UPIO_MEM,
@@ -759,7 +759,7 @@ static struct uart_pxa_port serial_pxa_ports[] = {
759 }, 759 },
760 }, { /* HWUART */ 760 }, { /* HWUART */
761 .name = "HWUART", 761 .name = "HWUART",
762 .cken = CKEN4_HWUART, 762 .cken = CKEN_HWUART,
763 .port = { 763 .port = {
764 .type = PORT_PXA, 764 .type = PORT_PXA,
765 .iotype = UPIO_MEM, 765 .iotype = UPIO_MEM,