Re: [PATCH 1/2] video, sm501: add OF binding to support SM501

2011-02-06 Thread Benjamin Herrenschmidt
On Sat, 2010-12-04 at 09:23 +0100, Heiko Schocher wrote:
 - add binding to OF, compatible name smi,sm501
 
 - add read/write functions for using this driver
   also on powerpc plattforms

 .../...

Who plans to merge that patch series ? I'm happy for whoever is doing
that to take the powerpc patch at the end (that adds the entry to
the .dts file) with my

Acked-by: Benjamin Herrenschmidt b...@kernel.crashing.org

Cheers,
Ben.


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 1/2] video, sm501: add OF binding to support SM501

2010-12-09 Thread Samuel Ortiz
Hi Heiko,

On Thu, Dec 09, 2010 at 07:49:45AM +0100, Heiko Schocher wrote:
 Hello Paul,
 
 Paul Mundt wrote:
  On Sat, Dec 04, 2010 at 09:23:47AM +0100, Heiko Schocher wrote:
  - add binding to OF, compatible name smi,sm501
 
 [...]
   Documentation/kernel-parameters.txt  |7 +
   Documentation/powerpc/dts-bindings/sm501.txt |   30 +++
   drivers/mfd/sm501.c  |  141 --
   drivers/video/sm501fb.c  |  264 
  +-
   include/linux/sm501.h|8 +
   5 files changed, 299 insertions(+), 151 deletions(-)
   create mode 100644 Documentation/powerpc/dts-bindings/sm501.txt
 
  Given that this is all SM501 dependent, is there some particular reason
  why you neglected to Cc the author or the MFD folks?
 
 Hups, sorry! No, there is no reason, thanks for detecting this.
 
 Hmm.. couldn;t find a MFD maillinglist?
We use lkml. Could you please re-send the patch to me ?

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 1/2] video, sm501: add OF binding to support SM501

2010-12-08 Thread Heiko Schocher
Hello Paul,

Paul Mundt wrote:
 On Sat, Dec 04, 2010 at 09:23:47AM +0100, Heiko Schocher wrote:
 - add binding to OF, compatible name smi,sm501

[...]
  Documentation/kernel-parameters.txt  |7 +
  Documentation/powerpc/dts-bindings/sm501.txt |   30 +++
  drivers/mfd/sm501.c  |  141 --
  drivers/video/sm501fb.c  |  264 
 +-
  include/linux/sm501.h|8 +
  5 files changed, 299 insertions(+), 151 deletions(-)
  create mode 100644 Documentation/powerpc/dts-bindings/sm501.txt

 Given that this is all SM501 dependent, is there some particular reason
 why you neglected to Cc the author or the MFD folks?

Hups, sorry! No, there is no reason, thanks for detecting this.

Hmm.. couldn;t find a MFD maillinglist?

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 1/2] video, sm501: add OF binding to support SM501

2010-12-07 Thread Paul Mundt
On Sat, Dec 04, 2010 at 09:23:47AM +0100, Heiko Schocher wrote:
 - add binding to OF, compatible name smi,sm501
 
 - add read/write functions for using this driver
   also on powerpc plattforms
 
 - add commandline options:
   sm501.fb_mode:
 Specify resolution as xresxyres[-bpp][@refresh]
   sm501.bpp:
 Specify bit-per-pixel if not specified mode
 
 - Add support for encoding display mode information
   in the device tree using verbatim EDID block.
 
   If the edid entry in the smi,sm501 node is present,
   the driver will build mode database using EDID data
   and allow setting the display modes from this database.
 
 Signed-off-by: Heiko Schocher h...@denx.de
 cc: linux-fb...@vger.kernel.org
 cc: devicetree-disc...@ozlabs.org
 ---
 based against 2.6.37-rc4
 
 ./scripts/checkpatch.pl 
 0003-video-sm501-add-OF-binding-to-support-SM501.patch lems and is ready for
 total: 0 errors, 0 warnings, 1067 lines checked
 
 0003-video-sm501-add-OF-binding-to-support-SM501.patch has no obvious style 
 problems and is ready for submission.
 
  Documentation/kernel-parameters.txt  |7 +
  Documentation/powerpc/dts-bindings/sm501.txt |   30 +++
  drivers/mfd/sm501.c  |  141 --
  drivers/video/sm501fb.c  |  264 
 +-
  include/linux/sm501.h|8 +
  5 files changed, 299 insertions(+), 151 deletions(-)
  create mode 100644 Documentation/powerpc/dts-bindings/sm501.txt
 
Given that this is all SM501 dependent, is there some particular reason
why you neglected to Cc the author or the MFD folks?
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH 1/2] video, sm501: add OF binding to support SM501

2010-12-04 Thread Heiko Schocher
- add binding to OF, compatible name smi,sm501

- add read/write functions for using this driver
  also on powerpc plattforms

- add commandline options:
  sm501.fb_mode:
Specify resolution as xresxyres[-bpp][@refresh]
  sm501.bpp:
Specify bit-per-pixel if not specified mode

- Add support for encoding display mode information
  in the device tree using verbatim EDID block.

  If the edid entry in the smi,sm501 node is present,
  the driver will build mode database using EDID data
  and allow setting the display modes from this database.

Signed-off-by: Heiko Schocher h...@denx.de
cc: linux-fb...@vger.kernel.org
cc: devicetree-disc...@ozlabs.org
---
based against 2.6.37-rc4

./scripts/checkpatch.pl 0003-video-sm501-add-OF-binding-to-support-SM501.patch 
lems and is ready for
total: 0 errors, 0 warnings, 1067 lines checked

0003-video-sm501-add-OF-binding-to-support-SM501.patch has no obvious style 
problems and is ready for submission.

 Documentation/kernel-parameters.txt  |7 +
 Documentation/powerpc/dts-bindings/sm501.txt |   30 +++
 drivers/mfd/sm501.c  |  141 --
 drivers/video/sm501fb.c  |  264 +-
 include/linux/sm501.h|8 +
 5 files changed, 299 insertions(+), 151 deletions(-)
 create mode 100644 Documentation/powerpc/dts-bindings/sm501.txt

diff --git a/Documentation/kernel-parameters.txt 
b/Documentation/kernel-parameters.txt
index cdd2a6e..6341541 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -2301,6 +2301,13 @@ and is between 256 and 4096 characters. It is defined in 
the file
merging on their own.
For more information see Documentation/vm/slub.txt.
 
+   sm501.bpp=  SM501 Display driver:
+   Specify bit-per-pixel if not specified mode
+
+   sm501fb.mode=   SM501 Display driver:
+   Specify resolution as
+   xresxyres[-bpp][@refresh]
+
smart2= [HW]
Format: io1[,io2[,...,io8]]
 
diff --git a/Documentation/powerpc/dts-bindings/sm501.txt 
b/Documentation/powerpc/dts-bindings/sm501.txt
new file mode 100644
index 000..9905dd9
--- /dev/null
+++ b/Documentation/powerpc/dts-bindings/sm501.txt
@@ -0,0 +1,30 @@
+* SM SM501
+
+The SM SM501 is a LCD controller, with proper hardware, it can also
+drive DVI monitors.
+
+Required properties:
+- compatible : should be smi,sm501.
+- reg : contain two entries:
+- First entry: System Configuration register
+- Second entry: IO space (Display Controller register)
+- interrupts : SMI interrupt to the cpu should be described here.
+- interrupt-parent : the phandle for the interrupt controller that
+  services interrupts for this device.
+
+Optional properties:
+- mode : select a video mode:
+xresxyres[-bpp][@refresh]
+- edid : verbatim EDID data block describing attached display.
+  Data from the detailed timing descriptor will be used to
+  program the display controller.
+
+Example for MPC5200:
+   disp...@1,0 {
+   compatible = smi,sm501;
+   reg = 1 0x 0x0080
+  1 0x03e0 0x0020;
+   interrupts = 1 1 3;
+   mode = 640x480...@60;
+   edid = [edid-data];
+   };
diff --git a/drivers/mfd/sm501.c b/drivers/mfd/sm501.c
index bc9275c..d1f952c 100644
--- a/drivers/mfd/sm501.c
+++ b/drivers/mfd/sm501.c
@@ -133,10 +133,10 @@ static unsigned long decode_div(unsigned long pll2, 
unsigned long val,
 
 static void sm501_dump_clk(struct sm501_devdata *sm)
 {
-   unsigned long misct = readl(sm-regs + SM501_MISC_TIMING);
-   unsigned long pm0 = readl(sm-regs + SM501_POWER_MODE_0_CLOCK);
-   unsigned long pm1 = readl(sm-regs + SM501_POWER_MODE_1_CLOCK);
-   unsigned long pmc = readl(sm-regs + SM501_POWER_MODE_CONTROL);
+   unsigned long misct = smc501_readl(sm-regs + SM501_MISC_TIMING);
+   unsigned long pm0 = smc501_readl(sm-regs + SM501_POWER_MODE_0_CLOCK);
+   unsigned long pm1 = smc501_readl(sm-regs + SM501_POWER_MODE_1_CLOCK);
+   unsigned long pmc = smc501_readl(sm-regs + SM501_POWER_MODE_CONTROL);
unsigned long sdclk0, sdclk1;
unsigned long pll2 = 0;
 
@@ -193,29 +193,29 @@ static void sm501_dump_regs(struct sm501_devdata *sm)
void __iomem *regs = sm-regs;
 
dev_info(sm-dev, System Control   %08x\n,
-   readl(regs + SM501_SYSTEM_CONTROL));
+   smc501_readl(regs + SM501_SYSTEM_CONTROL));
dev_info(sm-dev, Misc Control %08x\n,
-   readl(regs + SM501_MISC_CONTROL));
+   smc501_readl(regs + SM501_MISC_CONTROL));
dev_info(sm-dev, GPIO Control Low %08x\n,
-   readl(regs + SM501_GPIO31_0_CONTROL));
+   smc501_readl(regs +