Re: [PATCH 01/01] New FBDev driver for Intel Vermilion Range

2007-04-20 Thread Alan Hourihane
I've updated the Vermilion Range (LE80578) patch against linus' tree.

Hopefully this rectifies all of the issues noted previously.

Let me know again if there's more updates needed.

Thanks to all who responded with the feedback, it was appreciated.

Alan.
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index e4f0dd0..eedd4c5 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -806,6 +806,22 @@ config FB_I810_I2C
 	select FB_DDC
 	help
 
+config FB_LE80578
+	tristate "Intel LE80578 (Vermilion) support"
+	depends on FB && PCI && X86
+	select FB_MODE_HELPERS
+	select FB_CFB_FILLRECT
+	select FB_CFB_COPYAREA
+	select FB_CFB_IMAGEBLIT
+	help
+	  This driver supports the LE80578 (Vermilion Range) chipset
+
+config FB_CARILLO_RANCH
+	tristate "Intel Carillo Ranch support"
+	depends on FB_LE80578 && FB && PCI && X86
+	help
+	  This driver supports the LE80578 (Carillo Ranch) board
+
 config FB_INTEL
 	tristate "Intel 830M/845G/852GM/855GM/865G/915G/945G support (EXPERIMENTAL)"
 	depends on FB && EXPERIMENTAL && PCI && X86
diff --git a/drivers/video/Makefile b/drivers/video/Makefile
index 760305c..8bc405b 100644
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -51,6 +51,7 @@ obj-$(CONFIG_FB_IMSTT)+= imsttfb.o
 obj-$(CONFIG_FB_FM2)  += fm2fb.o
 obj-$(CONFIG_FB_CYBLA)+= cyblafb.o
 obj-$(CONFIG_FB_TRIDENT)  += tridentfb.o
+obj-$(CONFIG_FB_LE80578)  += vermilion/
 obj-$(CONFIG_FB_S3)   += s3fb.o vgastate.o
 obj-$(CONFIG_FB_STI)  += stifb.o
 obj-$(CONFIG_FB_FFB)  += ffb.o sbuslib.o
diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig
index 47d15b5..fbef663 100644
--- a/drivers/video/backlight/Kconfig
+++ b/drivers/video/backlight/Kconfig
@@ -63,3 +63,11 @@ config BACKLIGHT_PROGEAR
 	help
 	  If you have a Frontpath ProGear say Y to enable the
 	  backlight driver.
+
+config BACKLIGHT_CARILLO_RANCH
+	tristate "Intel Carillo Ranch Backlight Driver"
+	depends on BACKLIGHT_CLASS_DEVICE && LCD_CLASS_DEVICE && PCI && X86 && FB_LE80578
+	default n
+	help
+	  If you have a Intel LE80578 (Carillo Ranch) say Y to enable the
+	  backlight driver.
diff --git a/drivers/video/backlight/Makefile b/drivers/video/backlight/Makefile
index 0c3ce46..c6e2266 100644
--- a/drivers/video/backlight/Makefile
+++ b/drivers/video/backlight/Makefile
@@ -6,3 +6,4 @@ obj-$(CONFIG_BACKLIGHT_CORGI)	+= corgi_bl.o
 obj-$(CONFIG_BACKLIGHT_HP680)	+= hp680_bl.o
 obj-$(CONFIG_BACKLIGHT_LOCOMO)	+= locomolcd.o
 obj-$(CONFIG_BACKLIGHT_PROGEAR) += progear_bl.o
+obj-$(CONFIG_BACKLIGHT_CARILLO_RANCH) += cr_bllcd.o
diff --git a/drivers/video/backlight/cr_bllcd.c b/drivers/video/backlight/cr_bllcd.c
new file mode 100644
index 000..8fb288b
--- /dev/null
+++ b/drivers/video/backlight/cr_bllcd.c
@@ -0,0 +1,287 @@
+/*  
+ * Copyright (c) Intel Corp. 2007.
+ * All Rights Reserved.
+ *
+ * Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
+ * develop this driver.
+ *
+ * This file is part of the Carillo Ranch video subsystem driver.
+ * The Carillo Ranch video subsystem driver is free software; 
+ * you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * The Carillo Ranch video subsystem driver is distributed 
+ * in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this driver; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Authors: 
+ *   Thomas Hellstrom 
+ *   Alan Hourihane 
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+/* The LVDS- and panel power controls sits on the 
+ * GPIO port of the ISA bridge. 
+ */
+
+#define CRVML_DEVICE_LPC0x27B8
+#define CRVML_REG_GPIOBAR   0x48
+#define CRVML_REG_GPIOEN0x4C
+#define CRVML_GPIOEN_BIT(1 << 4)
+#define CRVML_PANEL_PORT0x38
+#define CRVML_LVDS_ON   0x0001
+#define CRVML_PANEL_ON  0x0002
+#define CRVML_BACKLIGHT_OFF 0x0004
+
+/* The PLL Clock register sits on Host bridge */
+#define CRVML_DEVICE_MCH   0x5001
+#define CRVML_REG_MCHBAR   0x44
+#define CRVML_REG_MCHEN0x54
+#define CRVML_MCHEN_BIT(1 << 28)
+#define CRVML_MCHMAP_SIZE  4096
+#define CRVML_REG_CLOCK0xc3c
+#define CRVML_CLOCK_SHIFT  8
+#define CRVML_CLOCK_MASK   0x0f00
+
+static struct pci_dev *lpc_dev;
+static 

Re: [PATCH 01/01] New FBDev driver for Intel Vermilion Range

2007-04-20 Thread Alan Hourihane
On Fri, 2007-04-20 at 21:51 +0800, Antonino A. Daplas wrote:
> On Fri, 2007-04-20 at 10:04 +0100, Alan Hourihane wrote:
> > I've updated the Vermilion Range (LE80578) patch against linus' tree.
> > 
> > Hopefully this rectifies all of the issues noted previously.
> > 
> > Let me know again if there's more updates needed.
> > 
> > Thanks to all who responded with the feedback, it was appreciated.
> > 
> 
> This (at least the framebuffer part) looks good to me (except for the
> excessive curly braces, but that can be fixed easily).  Okay if I add a 
> 
> Signed-off-by: Alan Hourihane <[EMAIL PROTECTED]>?

Signed-off-by: Alan Hourihane <[EMAIL PROTECTED]>

would be better.

Thanks Antonino !

Alan.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 01/01] New FBDev driver for Intel Vermilion Range

2007-04-05 Thread Alan Hourihane
On Thu, 2007-04-05 at 13:38 -0400, [EMAIL PROTECTED] wrote:
> On Thu, 05 Apr 2007 11:44:46 BST, Alan Hourihane said:
> 
> > Attached is a patch against 2.6.21-rc5 which adds the Intel Vermilion
> > Range support.
> 
> One non-technical question here...
> 
> > +config FB_VERMILION
> > +   tristate "Vermilion support"
> > +   depends on FB && PCI && X86
> > +   select FB_MODE_HELPERS
> > +   select FB_CFB_FILLRECT
> > +   select FB_CFB_COPYAREA
> > +   select FB_CFB_IMAGEBLIT
> > +   help
> > + This driver supports the Vermilion Range chipset
> 
> Is 'Vermillion' the project codename, or the name that end users will actually
> see when hardware ships?  Most of the Intel graphics chopsets have been
> named things like i810, i925, and so on - if the user-visible name is known,
> that should probably be reflected in the 'tristate' string and help
> text (FB_VERMILLION in the code is fine by be though).

I've asked the question and the part number would be...

LE80578

So, if that desperately needs changing let me know and I'll submit
another patch, or maybe someone can make the tweak for me.

Thanks,

Alan.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 01/01] New FBDev driver for Intel Vermilion Range

2007-04-05 Thread Alan Hourihane
On Thu, 2007-04-05 at 21:38 +0200, Arnd Bergmann wrote:
> On Thursday 05 April 2007, Alan Hourihane wrote:
> > @@ -0,0 +1,405 @@
> > +/*  
> > + * Copyright (c) Intel Corp. 2007.
> > + * All Rights Reserved.
> > + *
> 
> Saying 'All Rights Reserved' is usually considered the opposite of
> licensing your code as GPL. I suppose you need to remove that.

Arnd, 

Thanks for your comments, and I'll review and make appropriate changes
as you've suggested.

As for the above, I've noticed that drivers/video/epson1355fb.c also has
this wording and is under the GPL. 

Alan.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 01/01] New FBDev driver for Intel Vermilion Range

2007-04-06 Thread Alan Hourihane
On Fri, 2007-04-06 at 08:09 +0800, Antonino A. Daplas wrote:
> On Thu, 2007-04-05 at 11:44 +0100, Alan Hourihane wrote:
> > Attached is a patch against 2.6.21-rc5 which adds the Intel Vermilion
> > Range support.
> > 
> > Intel funded Tungsten Graphics to do this work.
> > 
> > If there's any problems or updates needed to be done to get accepted,
> > please let me know.
> > 
> 
> Preferably, add sparse annotations and compile with make C=1. I've
> included possible sparse annotations (the only ones I can see) below.

Great. Thanks for this information.

> Perhaps backling_on/off and panel_on/off can be moved to the backlight
> subsystem?

Another good pointer.

Thanks. I'll revisit things and get back to the list.

Alan.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/