Skip to contentSkip to conversation

fix PWL macro names

PATCH In review andrzej zaborowski 3 participants 4 messages Jun 29, 2006 – Aug 4, 2006 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix PWL macro names

Remove "16XX" from the names of PWL-related defines as they are valid for other models as well.
---
Regards,
Andzej

drivers/video/omap/lcd_osk.c +4 -4
diff -pNaur -X linux-omap-2.6-newbuild/Documentation/dontdiff linux-omap-2.6/drivers/video/omap/lcd_osk.c linux-omap-2.6-newbuild/drivers/video/omap/lcd_osk.c
@@ -44,10 +44,10 @@ static int osk_panel_enable(struct lcd_p
 	omap_cfg_reg(PWL);
 
 	/* Enable PWL unit */
-	omap_writeb(0x01, OMAP16XX_PWL_CLK_ENABLE);
+	omap_writeb(0x01, OMAP_PWL_CLK_ENABLE);
 
 	/* Set PWL level */
-	omap_writeb(0xFF, OMAP16XX_PWL_ENABLE);
+	omap_writeb(0xFF, OMAP_PWL_ENABLE);
 
 	/* configure GPIO2 as output */
 	omap_set_gpio_direction(2, 0);
@@ -61,10 +61,10 @@ static int osk_panel_enable(struct lcd_p
 static void osk_panel_disable(struct lcd_panel *panel)
 {
 	/* Set PWL level to zero */
-	omap_writeb(0x00, OMAP16XX_PWL_ENABLE);
+	omap_writeb(0x00, OMAP_PWL_ENABLE);
 
 	/* Disable PWL unit */
-	omap_writeb(0x00, OMAP16XX_PWL_CLK_ENABLE);
+	omap_writeb(0x00, OMAP_PWL_CLK_ENABLE);
 
 	/* set GPIO2 low */
 	omap_set_gpio_dataout(2, 0);
include/asm-arm/arch-omap/omap16xx.h +3 -3
diff -pNaur -X linux-omap-2.6-newbuild/Documentation/dontdiff linux-omap-2.6/include/asm-arm/arch-omap/omap16xx.h linux-omap-2.6-newbuild/include/asm-arm/arch-omap/omap16xx.h
@@ -163,9 +163,9 @@
  * Pulse-Width Light
  * ----------------------------------------------------------------------------
  */
-#define OMAP16XX_PWL_BASE	(0xfffb5800)
-#define OMAP16XX_PWL_ENABLE	(OMAP16XX_PWL_BASE + 0x00)
-#define OMAP16XX_PWL_CLK_ENABLE	(OMAP16XX_PWL_BASE + 0x04)
+#define OMAP_PWL_BASE		0xfffb5800
+#define OMAP_PWL_ENABLE		(OMAP_PWL_BASE + 0x00)
+#define OMAP_PWL_CLK_ENABLE	(OMAP_PWL_BASE + 0x04)
 
 /*
  * ---------------------------------------------------------------------------
#1 lore raw
Quoted 2 lines · andrzej zaborowski

Remove "16XX" from the names of PWL-related defines as they are valid for other models as well.

Move them out of omap16xx.h as well then? I'm in favour of this change though.

J.

Signature · 1 line
noodles is on fire
#2 lore raw
Quoted 6 lines · Jonathan McDowell
Quoted 2 lines · andrzej zaborowski

Remove "16XX" from the names of PWL-related defines as they are valid for other models as well.

Move them out of omap16xx.h as well then? I'm in favour of this change though.

Ok, patch attached.
I will do the same for UART3 defines later because they are used for IrDA and I got the IrDA driver working on my OMAP311 with minor changes (still testing).

Quoted 10 lines

J.

--
noodles is on fire
_______________________________________________
Linux-omap-open-source mailing list
[email protected]
http://linux.omap.com/mailman/listinfo/linux-omap-open-source

---

Move PWL-related defines out of "omap16xx.h" as they are also valid for models other than 16xx.

---
Regards,
Andrzej

drivers/video/omap/lcd_osk.c +4 -4
diff -pNaur -X linux-omap-2.6-newbuild/Documentation/dontdiff linux-omap-2.6/drivers/video/omap/lcd_osk.c linux-omap-2.6-newbuild/drivers/video/omap/lcd_osk.c
@@ -44,10 +44,10 @@ static int osk_panel_enable(struct lcd_p
 	omap_cfg_reg(PWL);
 
 	/* Enable PWL unit */
-	omap_writeb(0x01, OMAP16XX_PWL_CLK_ENABLE);
+	omap_writeb(0x01, OMAP_PWL_CLK_ENABLE);
 
 	/* Set PWL level */
-	omap_writeb(0xFF, OMAP16XX_PWL_ENABLE);
+	omap_writeb(0xFF, OMAP_PWL_ENABLE);
 
 	/* configure GPIO2 as output */
 	omap_set_gpio_direction(2, 0);
@@ -61,10 +61,10 @@ static int osk_panel_enable(struct lcd_p
 static void osk_panel_disable(struct lcd_panel *panel)
 {
 	/* Set PWL level to zero */
-	omap_writeb(0x00, OMAP16XX_PWL_ENABLE);
+	omap_writeb(0x00, OMAP_PWL_ENABLE);
 
 	/* Disable PWL unit */
-	omap_writeb(0x00, OMAP16XX_PWL_CLK_ENABLE);
+	omap_writeb(0x00, OMAP_PWL_CLK_ENABLE);
 
 	/* set GPIO2 low */
 	omap_set_gpio_dataout(2, 0);
include/asm-arm/arch-omap/hardware.h +9 -0
diff -pNaur -X linux-omap-2.6-newbuild/Documentation/dontdiff linux-omap-2.6/include/asm-arm/arch-omap/hardware.h linux-omap-2.6-newbuild/include/asm-arm/arch-omap/hardware.h
@@ -268,6 +268,15 @@
 #define OMAP_LPG2_PMR			(OMAP_LPG2_BASE + 0x04)
 
 /*
+ * ----------------------------------------------------------------------------
+ * Pulse-Width Light
+ * ----------------------------------------------------------------------------
+ */
+#define OMAP_PWL_BASE			0xfffb5800
+#define OMAP_PWL_ENABLE			(OMAP_PWL_BASE + 0x00)
+#define OMAP_PWL_CLK_ENABLE		(OMAP_PWL_BASE + 0x04)
+
+/*
  * ---------------------------------------------------------------------------
  * Processor specific defines
  * ---------------------------------------------------------------------------
include/asm-arm/arch-omap/omap16xx.h +0 -9
diff -pNaur -X linux-omap-2.6-newbuild/Documentation/dontdiff linux-omap-2.6/include/asm-arm/arch-omap/omap16xx.h linux-omap-2.6-newbuild/include/asm-arm/arch-omap/omap16xx.h
@@ -159,15 +159,6 @@
 #define UART3_MVR               (OMAP_UART3_BASE + 0x50)
 
 /*
- * ----------------------------------------------------------------------------
- * Pulse-Width Light
- * ----------------------------------------------------------------------------
- */
-#define OMAP16XX_PWL_BASE	(0xfffb5800)
-#define OMAP16XX_PWL_ENABLE	(OMAP16XX_PWL_BASE + 0x00)
-#define OMAP16XX_PWL_CLK_ENABLE	(OMAP16XX_PWL_BASE + 0x04)
-
-/*
  * ---------------------------------------------------------------------------
  * Watchdog timer
  * ---------------------------------------------------------------------------
#3 lore raw
Quoted 5 lines · andrzej zaborowski
Quoted 4 lines · Jonathan McDowell
Quoted 2 lines · andrzej zaborowski

Remove "16XX" from the names of PWL-related defines as they are valid for other models as well.

Quoted 7 lines
Quoted 2 lines

Move them out of omap16xx.h as well then? I'm in favour of this change though.

Ok, patch attached.
I will do the same for UART3 defines later because they are used for IrDA and I got the IrDA driver working on my OMAP311 with minor changes (still testing).

Pushing today. Please separate the core omap files and add a Signed-off-by next time as specified in:

http://www.muru.com/linux/omap/README_OMAP_PATCHES

Tony