|
From: <ph...@us...> - 2007-02-18 04:04:16
|
Revision: 841
http://svn.sourceforge.net/hackndev/?rev=841&view=rev
Author: phiren
Date: 2007-02-17 20:04:15 -0800 (Sat, 17 Feb 2007)
Log Message:
-----------
Zire 31: updated lcd code for new lcd driver
Modified Paths:
--------------
linux4palm/linux/trunk/arch/arm/mach-pxa/palmz31/gpioed.c
linux4palm/linux/trunk/arch/arm/mach-pxa/palmz31/palmz31.c
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmz31/gpioed.c
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmz31/gpioed.c 2007-02-18 03:20:47 UTC (rev 840)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmz31/gpioed.c 2007-02-18 04:04:15 UTC (rev 841)
@@ -4,6 +4,7 @@
#include <linux/init.h>
#include <linux/proc_fs.h>
+#include <linux/irq.h>
#include <linux/interrupt.h>
#include <asm/irq.h>
#include <asm/mach/arch.h>
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmz31/palmz31.c
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmz31/palmz31.c 2007-02-18 03:20:47 UTC (rev 840)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmz31/palmz31.c 2007-02-18 04:04:15 UTC (rev 841)
@@ -12,6 +12,7 @@
#include <asm/arch/hardware.h>
#include <asm/mach/map.h>
#include <asm/domain.h>
+#include <linux/irq.h>
#include <linux/device.h>
#include <linux/platform_device.h>
@@ -67,7 +68,8 @@
/**
* USB
*/
-static struct workqueue_struct *my_workqueue;
+
+/*static struct workqueue_struct *my_workqueue;
#define MY_WORK_QUEUE_NAME "Palmz31"
static void palmz31_usb_power(void* irq)
{
@@ -89,7 +91,7 @@
queue_work(my_workqueue, &task);
return IRQ_HANDLED;
-}
+} */
static int palmz31_usb_init()
{
@@ -100,7 +102,7 @@
// Make sure USB is off, to save power
GPSR(GPIO_NR_PALMZ31_USB_POWER) = GPIO_bit(GPIO_NR_PALMZ31_USB_POWER);
// Then attach a interupt to USB detect
- ret = request_irq (IRQ_GPIO(GPIO_NR_PALMLD_USB_DETECT), palmz31_usb_irq, 0, "Detect USB", NULL);
+ /*ret = request_irq (IRQ_GPIO(GPIO_NR_PALMLD_USB_DETECT), palmz31_usb_irq, 0, "Detect USB", NULL);
if(ret!=0){ //Check if it worked
printk(KERN_ERR "Whoops: Can't attach irq to USB detect");
return 1; }
@@ -108,7 +110,8 @@
{
printk(KERN_ERR "Attached irq to USB detect");
return 0;
- }
+ } */
+ return 0;
}
static struct platform_device *devices[] __initdata = {
@@ -132,7 +135,8 @@
CKEN &= ~3;
}
-static struct pxafb_mach_info zire31_lcd __initdata = {
+static struct pxafb_mode_info zire31_lcd_modes[] = {
+{
.pixclock = 0,
.xres = 160,
.yres = 160,
@@ -144,13 +148,21 @@
.upper_margin = 0,
.lower_margin = 0,
.sync = FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT,
+},
+};
- .lccr0 = 0x00100079,
- .lccr3 = 0x03403d30,
-
+static struct pxafb_mach_info zire31_lcd = {
+ .modes = zire31_lcd_modes,
+ .num_modes = ARRAY_SIZE(zire31_lcd_modes),
+ /* fixme: this is a hack, use constants instead. */
+ .lccr0 = 0x00100079,
+ /* Palm sets 4700004, but with 4700002 we eliminate the annoying screen noise */
+ .lccr3 = 0x03403d30,
+
.pxafb_backlight_power = zire31_backlight_power,
};
+
static void __init zire31_int(void)
{
set_pxa_fb_info(&zire31_lcd);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|