Re: [PATCH 9/10] drivers/mmc: Move a dereference below a NULL test

2009-07-20 Thread arun c
On Mon, Jul 20, 2009 at 1:31 PM, Adrian Hunter wrote:
> Julia Lawall wrote:
>>
>> From: Julia Lawall 
>>
>> If the NULL test is necessary, then the dereference should be moved below
>> the NULL test.
>>
>> The semantic patch that makes this change is as follows:
>> (http://www.emn.fr/x-info/coccinelle/)
>>
>> // 
>> @@
>> type T;
>> expression E,E1;
>> identifier i,fld;
>> statement S;
>> @@
>>
>> - T i = E->fld;
>> + T i;
>>  ... when != E=E1
>>      when != i
>>  BUG_ON (E == NULL||
>> -     i
>> +     E->fld
>>       == NULL || ...);
>> + i = E->fld;
>> // 
>>
>> Signed-off-by: Julia Lawall 
>>
>> ---
>>  drivers/mmc/host/omap.c             |    5 +++--
>>  1 files changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
>> index e7a331d..89281ab 100644
>> --- a/drivers/mmc/host/omap.c
>> +++ b/drivers/mmc/host/omap.c
>> @@ -255,11 +255,12 @@ static void mmc_omap_slot_release_work(struct
>> work_struct *work)
>>   static void mmc_omap_release_slot(struct mmc_omap_slot *slot, int
>> clk_enabled)
>>  {
>> -       struct mmc_omap_host *host = slot->host;
>> +       struct mmc_omap_host *host;
>>        unsigned long flags;
>>        int i;
>>  -       BUG_ON(slot == NULL || host->mmc == NULL);
>> +       BUG_ON(slot == NULL || slot->host->mmc == NULL);
>> +       host = slot->host;
>>          if (clk_enabled)
>>                /* Keeps clock running for at least 8 cycles on valid freq
>> */
>> --
>
> If slot is NULL it will oops anyway, so the following is better IMHO:
>
> static void mmc_omap_release_slot(struct mmc_omap_slot *slot, int
> clk_enabled)
> {
>        struct mmc_omap_host *host = slot->host;
>        unsigned long flags;
>        int i;
>
>> -       BUG_ON(slot == NULL || host->mmc == NULL);
>> +       BUG_ON(host->mmc == NULL);
>
>        if (clk_enabled)
>                /* Keeps clock running for at least 8 cycles on valid freq */
> --

According to http://isc.sans.org/diary.html?storyid=6820&rss "NULL check"
must be done before assigning the values. Does Julia Lawall's version
is the more correct one??

Arun
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Communication protocol through PCI between host and target

2009-01-03 Thread arun c
Hi all,

I am a newbie here please bear with me.

In my custom board the communication between host and target
should happen through PCI interface.

The target processor runs u-boot, and host processor is running linux.

The target devices will be accessed from the host by /dev nodes.

To reduce the workload on host all the target calls like
open, read ,write ,ioctl are passed directly to the target.

There will be a common PCI buffer between host
and target and target will take commands from this buffer
and execute. The result of executed API also will be put to a shared buffer
between host and target. [This is what I am planning to implement]

Anybody has come across similar sort of scenario?
Any ideas or any pointers will be highly appreciated.

Regards,
Arun C
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: touch screen not working on omap2430, how should i test it.

2008-10-07 Thread arun c
On Tue, Oct 7, 2008 at 4:45 AM, vishal bhoj <[EMAIL PROTECTED]> wrote:
> hi All,
>
>
> I have an application which uses touchscreen.
>
> Are there any test cases by which i can test if the touch screen is
> running properly
>
> thanks in advance .
> --
> with regards vishal
Hi,

You can use 'evtest' for testing.

Regards,
Arun C
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: omap-sdp3430_Rotation patch

2008-10-05 Thread arun c
Hi Rajesh,

On Mon, Oct 6, 2008 at 9:54 AM, Rajesh <[EMAIL PROTECTED]> wrote:
>
> Thanks for giving me the comments.I have incorporated all the comments
> and sending the complete patch for review
>
> 
> ~~
>
> From Rajesh K krajesh<[EMAIL PROTECTED]>
>
As I said earlier rotation is not for a particular board it will
affect all omap2/3 boards, so better
change this describtion.

> OMAP FBDEV: VRFB framebuffer rotation support for OMAP SDP
>
> This patch provides rotation support OMAP SDP. You will have to append
> video=omapfb:rotate=0 parameters to your u-boot arguments to get this
> working.
> This supports 0,90,180 and 270 degree rotations.
>
> Signed-off-by: Rajesh  K < [EMAIL PROTECTED] >
> Signed-off-by: Iqbal shareef < [EMAIL PROTECTED] >
>
> ---
>  arch/arm/plat-omap/include/mach/omapfb.h |4 +-
>  drivers/video/omap/dispc.c   |  193
> +-
>  drivers/video/omap/dispc.h   |   29 +
>  drivers/video/omap/omapfb_main.c |   37 ---
>  4 files changed, 243 insertions(+), 20 deletions(-)
>
> diff --git a/arch/arm/plat-omap/include/mach/omapfb.h
> b/arch/arm/plat-omap/include/mach/omapfb.h
> index a4a84f3..338a11d 100644
> --- a/arch/arm/plat-omap/include/mach/omapfb.h
> +++ b/arch/arm/plat-omap/include/mach/omapfb.h
> @@ -277,7 +277,7 @@ typedef int (*omapfb_notifier_callback_t)(struct
> notifier_block *,
>
>  struct omapfb_mem_region {
>dma_addr_t  paddr;
> -   void*vaddr;
> +   void __iomem*vaddr;
>unsigned long   size;
>u8  type;   /* OMAPFB_PLANE_MEM_* */
>unsignedalloc:1;/* allocated by the driver */
> @@ -306,7 +306,7 @@ struct lcd_ctrl {
>   int screen_width,
>   int pos_x, int pos_y, int width,
>   int height, int color_mode);
> -   int (*set_rotate) (int angle);
> +   int (*set_rotate) (int plane, int angle);
>int (*setup_mem)  (int plane, size_t size,
>   int mem_type, unsigned long
> *paddr);
>int (*mmap)   (struct fb_info *info,
> diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c
> index ce4c4de..94c96dd 100644
> --- a/drivers/video/omap/dispc.c
> +++ b/drivers/video/omap/dispc.c
> @@ -149,12 +149,25 @@
>  #define RESMAP_MASK(_page_nr)  \
>(1 << ((_page_nr) & (sizeof(unsigned long) * 8 - 1)))
>
> +unsigned long save_paddr;
> +unsigned long save_vaddr;
> +
>  struct resmap {
>unsigned long   start;
>unsignedpage_cnt;
>unsigned long   *map;
>  };
>
> +struct {
> +   unsigned long   paddr[4];
> +   void __iomem   *vaddr[4];
> +   u32 xoffset;
> +   u32 yoffset;
> +   unsigned long size_val;
> +   unsigned long control_val;
> +} vrfb;
> +
> +static void omap2_disp_set_vrfb(u32 width, u32 height, u32
> bytes_per_pixel);
>  static struct {
>void __iomem*base;
>
> @@ -459,6 +472,170 @@ static int omap_dispc_setup_plane(int plane, int
> channel_out,
>return r;
>  }
>
> +/*
> +*  pages_per_side : Will provide pages per side
> +*  @ img_side : img_side
> +*  @ page_exp : page_exponential
> +*  Return Value: Returns pages per side value.
> +*/
> +
> +static inline u32 pages_per_side(u32 img_side, u32 page_exp)
> +{
> +   return (img_side + (1<> page_exp;
> +}
> +
> +/*
> +*  omap2_disp_set_vrfb : Will configure VRFB Support.Its a rotation
> engine
> +*  which will supports rotations of 0,90,180,270 degrees.
> +*  @width: Width of the  image
> +*  @height : height of the image
> +*  @bytes_per_pixel : color depth of the image
> +*  return value :  None
> +*/
> +
> +static void omap2_disp_set_vrfb(u32 width, u32 height, u32 bytes_per_pixel)
> +{
> +   int page_width_exp, page_height_exp, pixel_size_exp;
> +   int context = 0;
> +   vrfb.size_val = 0;
> +   vrfb.control_val = 0;
> +   pixel_size_exp = bytes_per_pixel >> 1;
> +   page_width_exp = PAGE_WIDTH_EXP;
> +   page_height_exp = PAGE_HEIGHT_EXP;
> +
> +   width = ((1< +   (pages_per_side(width * bytes_per_pixel,
> +   page_width_exp))) >> pixel_size_exp;
> +   height = (1< +   (pages_per_side(height, page_height_exp));
> +
> +   __raw_writel(save_paddr, SMS_ROT0_PHYSICAL_BA(context));
> +   __raw_writel(0, SMS_ROT0_SIZE(context));
> +
> +   vrfb.size_val |= (width << SMS_IMAGEWIDTH_OFFSET)|
> +   (height << SMS_IMAGEHEIGHT_OFFSET);
> +   __raw_writel(vrfb.size_val, SMS_ROT0_SIZE(context));
> +   __raw_writel(0, SMS_ROT_

Re: OMAP3EVM LCD red tint

2008-09-27 Thread arun c
Hi Daniel Schaeffer

On Fri, Sep 26, 2008 at 4:20 PM, Daniel Schaeffer
<[EMAIL PROTECTED]> wrote:
> Has anyone looked into why the LCD display on the OMAP3EVM is always tinted
> red? I created a couple of color test images that I cat'ed to /dev/fb and it
> looks like the blue color channel is completely ignored.  I was testing on
> v2.6.26-omap2 but is doesn't look like there have been any changes to the fb
> driver since then so I'm assuming the issue is also present in the head of
> the git tree.
>
> Regards,
>
> Daniel Schaeffer
>

Try the patch below(Remember that you may have to manually edit because
this patch is against current HEAD)


diff --git a/drivers/video/omap/lcd_omap3evm.c
b/drivers/video/omap/lcd_omap3evm.c
index a564ca5..821bafe 100644
--- a/drivers/video/omap/lcd_omap3evm.c
+++ b/drivers/video/omap/lcd_omap3evm.c
@@ -44,6 +44,8 @@
 #define ENABLE_VDAC_DEV_GRP0x20
 #define ENABLE_VPLL2_DEDICATED 0x05
 #define ENABLE_VPLL2_DEV_GRP   0xE0
+#define TWL4030_VPLL2_DEV_GRP  0x33
+#define TWL4030_VPLL2_DEDICATED0x36

 #define TWL_LED_LEDEN  0x00
 #define TWL_PWMA_PWMAON0x00
@@ -86,12 +88,24 @@ static void omap3evm_panel_cleanup(struct lcd_panel *panel)

 static int omap3evm_panel_enable(struct lcd_panel *panel)
 {
+   if (system_rev > OMAP3430_REV_ES1_0) {
+   twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
+   ENABLE_VPLL2_DEDICATED, TWL4030_VPLL2_DEDICATED);
+   twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
+   ENABLE_VPLL2_DEV_GRP, TWL4030_VPLL2_DEV_GRP);
+   }
omap_set_gpio_dataout(LCD_PANEL_ENABLE_GPIO, 0);
return 0;
 }

 static void omap3evm_panel_disable(struct lcd_panel *panel)
 {
+   if (system_rev > OMAP3430_REV_ES1_0) {
+   twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x0,
+   TWL4030_VPLL2_DEDICATED);
+   twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 0x0,
+   TWL4030_VPLL2_DEV_GRP);
+   }
omap_set_gpio_dataout(LCD_PANEL_ENABLE_GPIO, 1);
 }


Regards,
Arun C
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: PM related problem with dispc controller

2008-09-23 Thread arun c
On Tue, Sep 23, 2008 at 2:49 AM, Högander Jouni
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm debugging pm-0 branch with SDP board and seeing lots of dispc
> related error printouts:
>
> / # <4>__ratelimit: 453 callbacks suppressed
> __ratelimit: 453 callbacks suppressed
> <3>omapfb omapfb: irq error status 00e2
> omapfb omapfb: irq error status 00e2
> <3>omapfb omapfb: irq error status 00e2
> omapfb omapfb: irq error status 00e2
> <3>omapfb omapfb: irq error status 00c0
> omapfb omapfb: irq error status 00c0
> <3>omapfb omapfb: irq error status 0062
> omapfb omapfb: irq error status 0062
> <3>omapfb omapfb: irq error status 00c2
> omapfb omapfb: irq error status 00c2
>
> The error bit in all these statuses is "GFXFIFOUNDERFLOW". Is this
> something that could happen e.g. in a case that mpu wake-up from wfi
> takes too long? I mean is there some interrupt that should be served
> faster? Or is this taken care by sdma/hw triggering and now sdma is
> not capable to fill the fifo for reason or another?
>
> I have cpuidle enabled and it is "forced" to select only C1 or
> C0. This means tha MPU, NEON, CORE and PER are always
> ON/INACTIVE. Display is also on and there is penguin logo on it. When
> I see these error messages there is also flickering on the display.
>
> This far I had found that on mpu wfi something is switched off
> sometimes. I can see that from consumption of SDP board. Sometimes
> consumption is much lower on wfi even if the states of domains are
> same. When this happens, also these omapfb irq errors begin to happen.
>
> I can workaround this problem by disabling DSS_ICK AUTOIDLE. Another
> workaround is to disable hw supervised mode for core_l3_clkdm or
> core_l4_clkdm.

Try disabling the smart standby feature of DISPC

Below is the patch for the same

diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c
index ce4c4de..7c868d5 100644
--- a/drivers/video/omap/dispc.c
+++ b/drivers/video/omap/dispc.c
@@ -1399,7 +1399,7 @@ static int omap_dispc_init(struct omapfb_device *fbdev, in
/* Enable smart standby/idle, autoidle and wakeup */
l = dispc_read_reg(DISPC_SYSCONFIG);
l &= ~((3 << 12) | (3 << 3));
-   l |= (2 << 12) | (2 << 3) | (1 << 2) | (1 << 0);
+   l |= (2 << 3) | (1 << 2) | (1 << 0);
dispc_write_reg(DISPC_SYSCONFIG, l);
omap_writel(1 << 0, DSS_BASE + DSS_SYSCONFIG);

Regards,
Arun C


>
> All comments and ideas are welcome.
>
> --
> Jouni Högander
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] OMAP3EVM: TWL4030 Keypad irq error fix

2008-09-19 Thread arun c
without this the below error messages were coming continuously

TWL4030 module irq 369 is disabled but can't be masked!
<2>TWL4030 module irq 369 is disabled but can't be masked!

Signed-off-by: Arun C <[EMAIL PROTECTED]>
---
 arch/arm/mach-omap2/board-omap3evm.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3evm.c
b/arch/arm/mach-omap2/board-omap3evm.c
index 92f70ce..f9fd06b 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 

 #include 
 #include 
@@ -176,6 +177,7 @@ static struct omap_kp_platform_data omap3evm_kp_data = {
.keymap = omap3evm_keymap,
.keymapsize = ARRAY_SIZE(omap3evm_keymap),
.rep= 1,
+   .irq= TWL4030_MODIRQ_KEYPAD,
 };

 static struct platform_device omap3evm_kp_device = {
-- 
1.5.3.4
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] omapfb: Remove casting and change coding style

2008-09-18 Thread arun c
As sugested by RMK

Signed-off-by: Arun C <[EMAIL PROTECTED]>
---
 arch/arm/plat-omap/include/mach/omapfb.h |4 ++--
 drivers/video/omap/omapfb_main.c |6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/plat-omap/include/mach/omapfb.h
b/arch/arm/plat-omap/include/mach/omapfb.h
index a4a84f3..a3c4408 100644
--- a/arch/arm/plat-omap/include/mach/omapfb.h
+++ b/arch/arm/plat-omap/include/mach/omapfb.h
@@ -276,8 +276,8 @@ typedef int (*omapfb_notifier_callback_t)(struct
notifier_block *,
  void *fbi);

 struct omapfb_mem_region {
-   dma_addr_t  paddr;
-   void*vaddr;
+   u32 paddr;
+   void __iomem*vaddr;
unsigned long   size;
u8  type;   /* OMAPFB_PLANE_MEM_* */
unsignedalloc:1;/* allocated by the driver */
diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c
index d176a2c..3bb4247 100644
--- a/drivers/video/omap/omapfb_main.c
+++ b/drivers/video/omap/omapfb_main.c
@@ -402,7 +402,7 @@ static void set_fb_fix(struct fb_info *fbi)
int bpp;

rg = &plane->fbdev->mem_desc.region[plane->idx];
-   fbi->screen_base= (char __iomem *)rg->vaddr;
+   fbi->screen_base= rg->vaddr;
fix->smem_start = rg->paddr;
fix->smem_len   = rg->size;

@@ -1718,8 +1718,8 @@ static int omapfb_do_probe(struct platform_device *pdev,

pr_info("omapfb: configured for panel %s\n", fbdev->panel->name);

-   def_vxres = def_vxres ? : fbdev->panel->x_res;
-   def_vyres = def_vyres ? : fbdev->panel->y_res;
+   def_vxres = def_vxres ? def_vxres : fbdev->panel->x_res;
+   def_vyres = def_vyres ? def_vyres : fbdev->panel->y_res;

init_state++;

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


Re: [PATCH] Re: omap-sdp3430_Rotation patch

2008-09-17 Thread arun c
Hi,

On Wed, Sep 17, 2008 at 11:43 AM,  <[EMAIL PROTECTED]> wrote:
> From: Rajesh K <[EMAIL PROTECTED]>
>
> OMAP FBDEV: VRFB framebuffer rotation support
>
> This patch provides rotation support for OMAP2/3. You will have to append
> video=omapfb:rotation=0 parameters to your u-boot arguments to get this
> working. This supports 0,90,180 and 270 degree rotations.
>
> Signed-off-by: Rajesh K <[EMAIL PROTECTED]>
> Signed-off-by: Iqbal Shareef <[EMAIL PROTECTED]>
> ---
>  arch/arm/plat-omap/include/mach/omapfb.h |4 +-
>  drivers/video/omap/dispc.c   |  189 
> +-
>  drivers/video/omap/dispc.h   |   33 +-
>  drivers/video/omap/omapfb_main.c |   32 +++---
>  4 files changed, 236 insertions(+), 22 deletions(-)
>
> diff --git a/arch/arm/plat-omap/include/mach/omapfb.h 
> b/arch/arm/plat-omap/include/mach/omapfb.h
> index a4a84f3..338a11d 100644
> --- a/arch/arm/plat-omap/include/mach/omapfb.h
> +++ b/arch/arm/plat-omap/include/mach/omapfb.h
> @@ -277,7 +277,7 @@ typedef int (*omapfb_notifier_callback_t)(struct 
> notifier_block *,
>
>  struct omapfb_mem_region {
>dma_addr_t  paddr;
> -   void*vaddr;
> +   void __iomem*vaddr;
>unsigned long   size;
>u8  type;   /* OMAPFB_PLANE_MEM_* */
>unsignedalloc:1;/* allocated by the driver */
> @@ -306,7 +306,7 @@ struct lcd_ctrl {
>   int screen_width,
>   int pos_x, int pos_y, int width,
>   int height, int color_mode);
> -   int (*set_rotate) (int angle);
> +   int (*set_rotate) (int plane, int angle);
>int (*setup_mem)  (int plane, size_t size,
>   int mem_type, unsigned long *paddr);
>int (*mmap)   (struct fb_info *info,
> diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c
> index ce4c4de..1f5a7a5 100644
> --- a/drivers/video/omap/dispc.c
> +++ b/drivers/video/omap/dispc.c
> @@ -149,12 +149,25 @@
>  #define RESMAP_MASK(_page_nr)  \
>(1 << ((_page_nr) & (sizeof(unsigned long) * 8 - 1)))
>
> +unsigned long save_paddr;

sav_vaddr is defined but nowhere used.

> +unsigned long save_vaddr;
> +
>  struct resmap {
>unsigned long   start;
>unsignedpage_cnt;
>unsigned long   *map;
>  };
>
> +struct {
> +   unsigned long   paddr[4];
> +   void __iomem   *vaddr[4];
> +   u32 xoffset;
> +   u32 yoffset;
> +   unsigned long size_val;
> +   unsigned long control_val;
> +} vrfb;
> +
> +static void omap2_disp_set_vrfb(u32 width, u32 height, u32 bytes_per_pixel);
>  static struct {
>void __iomem*base;
>
> @@ -459,6 +472,170 @@ static int omap_dispc_setup_plane(int plane, int 
> channel_out,
>return r;
>  }
>
> +/*
> +*  pages_per_side : Will provide pages per side
> +*  @ img_side : img_side
> +*  @ page_exp : page_exponential
> +*  Return Value: Returns pages per side value.
> +*/
> +
> +static inline u32 pages_per_side(u32 img_side, u32 page_exp)
> +{
> +   return (img_side + (1<> page_exp;
> +}
> +
> +/*
> +*  omap2_disp_set_vrfb : Will configure VRFB Support.Its a rotation 
> engine
> +*  which will supports rotations of 0,90,180,270 degrees.
> +*  @width: Width of the  image
> +*  @height : height of the image
> +*  @bytes_per_pixel : color depth of the image
> +*  return value :  None
> +*/
> +
> +static void omap2_disp_set_vrfb(u32 width, u32 height, u32 bytes_per_pixel)
> +{
> +   int page_width_exp, page_height_exp, pixel_size_exp;
> +   int context = 0;
> +   vrfb.size_val = 0;
> +   vrfb.control_val = 0;
> +   pixel_size_exp = bytes_per_pixel >> 1;
> +   page_width_exp = PAGE_WIDTH_EXP;
> +   page_height_exp = PAGE_HEIGHT_EXP;
> +
> +   width = ((1< +   (pages_per_side(width * bytes_per_pixel,
> +   page_width_exp))) >> pixel_size_exp;
> +   height = (1< +   (pages_per_side(height, page_height_exp));
> +
> +   __raw_writel(save_paddr, SMS_ROT0_PHYSICAL_BA(context));
> +   __raw_writel(0, SMS_ROT0_SIZE(context));
> +
> +   vrfb.size_val |= (width << SMS_IMAGEWIDTH_OFFSET)|
> +   (height << SMS_IMAGEHEIGHT_OFFSET);
> +   __raw_writel(vrfb.size_val, SMS_ROT0_SIZE(context));
> +   __raw_writel(0, SMS_ROT_CONTROL(context));
> +   vrfb.control_val |= pixel_size_exp << SMS_PS_OFFSET
> +   | (page_width_exp - pixel_size_exp) << SMS_PW_OFFSET
> +   | page_height_exp << SMS_PH_OFFSET;
> +   __raw_writel(vrfb.control_val, SMS_ROT_CONTROL(context));
> +}
> +
> +/*
> +*  omap_dispc_set_rotate : configuring rotation reg

[PATCH] omapfb: remove wrong scale call for gfx_plane

2008-09-09 Thread arun c
The gfx_plane doesn't support scaling.

Signed-off-by: Arun C <[EMAIL PROTECTED]>
---
 drivers/video/omap/dispc.c   |3 +--
 drivers/video/omap/omapfb_main.c |6 --
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c
index 82ba030..ce4c4de 100644
--- a/drivers/video/omap/dispc.c
+++ b/drivers/video/omap/dispc.c
@@ -519,8 +519,7 @@ static int omap_dispc_set_scale(int plane,
if ((unsigned)plane > OMAPFB_PLANE_NUM)
return -ENODEV;

-   if (plane == OMAPFB_PLANE_GFX &&
-   (out_width != orig_width || out_height != orig_height))
+   if (out_width != orig_width || out_height != orig_height)
return -EINVAL;

enable_lcd_clocks(1);
diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c
index 1ffe74c..d176a2c 100644
--- a/drivers/video/omap/omapfb_main.c
+++ b/drivers/video/omap/omapfb_main.c
@@ -223,13 +223,15 @@ static int ctrl_change_mode(struct fb_info *fbi)
if((r = fbdev->ctrl->set_rotate(var->rotate)) < 0)
return r;

-   if (fbdev->ctrl->set_scale != NULL)
+   if ((fbdev->ctrl->set_scale != NULL) && (plane->idx > 0))
r = fbdev->ctrl->set_scale(plane->idx,
   var->xres, var->yres,
   plane->info.out_width,
   plane->info.out_height);
+   if (r < 0)
+   return r;

-   return r;
+   return 0;
 }

 /*
-- 
1.5.3.4
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] omapfb: setting GOLCD bit for shadow registers to make effect

2008-09-08 Thread arun c
On Tue, Sep 9, 2008 at 1:32 AM, Måns Rullgård <[EMAIL PROTECTED]> wrote:
> "arun c" <[EMAIL PROTECTED]> writes:
>
>> A shadow register change has no direct effect on the display
>> configuration until the GOLCD (DISPC_CONTROL[5]) is set.
>>
>> Signed-off-by: Arun C <[EMAIL PROTECTED]>
>> ---
>>  drivers/video/omap/dispc.c |5 +
>>  1 files changed, 5 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c
>> index 82ba030..2e7af85 100644
>> --- a/drivers/video/omap/dispc.c
>> +++ b/drivers/video/omap/dispc.c
>> @@ -436,6 +436,11 @@ static inline int _setup_plane(int plane, int 
>> channel_out,
>>
>>   dispc_write_reg(ri_reg[plane], (screen_width - width) * bpp / 8 + 1);
>>
>> + /* Wait untill GOLCD bit is cleared and set it */
>
> Nit: "until" (one l)
>
>> + while (dispc_read_reg(DISPC_CONTROL) & (1 << 5))
>> + continue;
>> + MOD_REG_FLD(DISPC_CONTROL, 1 << 5, 1 << 5);
>> +
>>   return height * screen_width * bpp / 8;
>>  }
>
> This looks good.  However, the same thing is needed in
> omap_dispc_enable_plane() as well.  Placing the loop+set in a function
> (go_lcd()?) would make sense.
>
Thanks.
Yes that will be nice, I still see  modification of shadow registers
in some more places with out issuing a GOLCD. I agree the best
method is to make it a function

> --
> Måns Rullgård
> [EMAIL PROTECTED]
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] OMAP2EVM: Fix for omapfb irq error messages

2008-09-08 Thread arun c
On Sat, Sep 6, 2008 at 6:01 AM, arun c <[EMAIL PROTECTED]> wrote:
> This patch fixes the irq error warnings from omapfb which
> was stalling the console.
>
> Only the below 2 errors are coming now
>
> omapfb omapfb: irq error status 00e2
> omapfb omapfb: irq error status 00c0
>
> Signed-off-by: Arun C <[EMAIL PROTECTED]>
> ---
>  drivers/video/omap/lcd_omap2evm.c |6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/video/omap/lcd_omap2evm.c
> b/drivers/video/omap/lcd_omap2evm.c
> index 8a0105e..c58f2d0 100644
> --- a/drivers/video/omap/lcd_omap2evm.c
> +++ b/drivers/video/omap/lcd_omap2evm.c
> @@ -130,11 +130,11 @@ struct lcd_panel omap2evm_panel = {
>.x_res  = LCD_XRES,
>.y_res  = LCD_YRES,
>.hsw= 3,
> -   .hfp= 0,
> +   .hfp= 10,
>.hbp= 28,
>.vsw= 2,
> -   .vfp= 1,
> -   .vbp= 0,
> +   .vfp= 3,
> +   .vbp= 1,
>
>.pixel_clock= LCD_PIXCLOCK_MAX,
>
> --
> 1.5.3.4
>

Please ignore this patch as of now.

The problem is whenever I add support  for new device the
error(omapfb irq errors) is coming again. There was no issues
until we added support for nand. After nand support error
messages began to appear and this patch solved it.

Today I added support for touch screen and the errors
came again. I had to adjust the above values(hbp, hfp, vbp, vfp)
again to resolve the issues.

I am thinking that I will send the final stable values after
adding full support for OMAP2EVM.

Do anybody know how to optimize (hsw, hfp, hbp, vsw, vbp,
vfp) values?

Regards,
Arun C
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] omapfb: setting GOLCD bit for shadow registers to make effect

2008-09-08 Thread arun c
A shadow register change has no direct effect on the display
configuration until the GOLCD (DISPC_CONTROL[5]) is set.

Signed-off-by: Arun C <[EMAIL PROTECTED]>
---
 drivers/video/omap/dispc.c |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c
index 82ba030..2e7af85 100644
--- a/drivers/video/omap/dispc.c
+++ b/drivers/video/omap/dispc.c
@@ -436,6 +436,11 @@ static inline int _setup_plane(int plane, int channel_out,

dispc_write_reg(ri_reg[plane], (screen_width - width) * bpp / 8 + 1);

+   /* Wait untill GOLCD bit is cleared and set it */
+   while (dispc_read_reg(DISPC_CONTROL) & (1 << 5))
+   continue;
+   MOD_REG_FLD(DISPC_CONTROL, 1 << 5, 1 << 5);
+
return height * screen_width * bpp / 8;
 }

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


[PATCH] OMAP2EVM: Fix for omapfb irq error messages

2008-09-06 Thread arun c
This patch fixes the irq error warnings from omapfb which
was stalling the console.

Only the below 2 errors are coming now

omapfb omapfb: irq error status 00e2
omapfb omapfb: irq error status 00c0

Signed-off-by: Arun C <[EMAIL PROTECTED]>
---
 drivers/video/omap/lcd_omap2evm.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/video/omap/lcd_omap2evm.c
b/drivers/video/omap/lcd_omap2evm.c
index 8a0105e..c58f2d0 100644
--- a/drivers/video/omap/lcd_omap2evm.c
+++ b/drivers/video/omap/lcd_omap2evm.c
@@ -130,11 +130,11 @@ struct lcd_panel omap2evm_panel = {
.x_res  = LCD_XRES,
.y_res  = LCD_YRES,
.hsw= 3,
-   .hfp= 0,
+   .hfp= 10,
.hbp= 28,
.vsw= 2,
-   .vfp= 1,
-   .vbp= 0,
+   .vfp= 3,
+   .vbp= 1,

.pixel_clock= LCD_PIXCLOCK_MAX,

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


Re: [PATCH] ARM: OMAP3: Fix omapfb's problem on OMAP3430sdp

2008-09-01 Thread arun c
On Mon, Sep 1, 2008 at 9:37 AM, stanley.miao <[EMAIL PROTECTED]> wrote:
> In RGB565 mode, red and blue color are filtered, so the picture on LCD
> looks green and dark.
>
> Fix omapfb's problem on OMAP3430sdp.
>
> Signed-off-by: Stanley Miao <[EMAIL PROTECTED]>
>
> ---
> diff --git a/drivers/video/omap/lcd_2430sdp.c
> b/drivers/video/omap/lcd_2430sdp.c
> index 9af6cd0..896a236 100644
> --- a/drivers/video/omap/lcd_2430sdp.c
> +++ b/drivers/video/omap/lcd_2430sdp.c
> @@ -23,6 +23,7 @@
>
>  #include 
>  #include 
> +#include 
>  #include 
>
>  #include 
> @@ -45,6 +46,10 @@ static unsigned enable_gpio;
>  #define ENABLE_VAUX3_DEDICATED 0x03
>  #define ENABLE_VAUX3_DEV_GRP   0x20
>
> +#define ENABLE_VPLL2_DEDICATED  0x05
> +#define ENABLE_VPLL2_DEV_GRP0xE0
> +#define TWL4030_VPLL2_DEV_GRP   0x33
> +#define TWL4030_VPLL2_DEDICATED 0x36
>
>  #define t2_out(c, r, v) twl4030_i2c_write_u8(c, r, v)
>
> @@ -76,6 +81,11 @@ static int sdp2430_panel_enable(struct lcd_panel
> *panel)
>  {
>u8 ded_val, ded_reg;
>u8 grp_val, grp_reg;

The below code will execute in 2430SDP also because is_sil_rev_less_than()
will be false there.
You need some mechanism to avoid that right?

> +
> +   if(!is_sil_rev_less_than(OMAP3430_REV_ES2_0)) {
> +   t2_out(PM_RECEIVER, 
> ENABLE_VPLL2_DEDICATED,TWL4030_VPLL2_DEDICATED);
> +   t2_out(PM_RECEIVER, 
> ENABLE_VPLL2_DEV_GRP,TWL4030_VPLL2_DEV_GRP);
> +   }
>
>if (machine_is_omap_3430sdp()) {
>ded_reg = TWL4030_VAUX3_DEDICATED;
> @@ -104,6 +114,11 @@ static void sdp2430_panel_disable(struct lcd_panel
> *panel)
>  {
>omap_set_gpio_dataout(enable_gpio, 0);
>omap_set_gpio_dataout(backlight_gpio, 0);

Here too the same
> +   if(!is_sil_rev_less_than(OMAP3430_REV_ES2_0)) {
> +   t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEDICATED);
> +   t2_out(PM_RECEIVER, 0x0, TWL4030_VPLL2_DEV_GRP);
> +   mdelay(4);
> +   }
>  }
>
>  static unsigned long sdp2430_panel_get_caps(struct lcd_panel *panel)
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: omapfb problem on 3430sdp

2008-08-31 Thread arun c
On Sun, Aug 31, 2008 at 9:31 PM, stanley.miao
<[EMAIL PROTECTED]> wrote:
>
> On Fri, 2008-08-29 at 21:18 +0530, arun c wrote:
>> Hi stanley,
>>
>> On Fri, Aug 29, 2008 at 5:58 PM, stanley.miao
>> <[EMAIL PROTECTED]> wrote:
>> >
>> > I have tried. It is not backlight's problem.
>>
>> Try this out
>>
>> Boot with the working kernel after that soft reset the board and try
>> the non working image(git) and see what happens.
>>
>> If no success
>
> If yes, what should I do ? You seems to encounter this problem ever.
>
> After soft reset with the working kernel, the non-working kernel will
> work. It look like the initial process is incomplete.

Can you check DSS DATA pin voltages for both the kernel?

Procedure:
Write various data (white, red ,green ,blue etc.) and verify
the pin voltages.

>
> Thanks
> Stanley
>
>>
>> Try the below values in lcd_2430sdp.c
>>
>> #define ENABLE_VAUX3_DEDICATED  0x05
>> #define ENABLE_VAUX3_DEV_GRP0xE0
>>
>> >
>> > I found that only green color was showed, red and blue were filtered. So
>> > the picture looked green and dark.
>> >
>> > The color mode is RGB565. I wrote 0x07e0, 0xffe0, and 0x to /dev/fb0
>> > respectively. All of them are showed to the same color, it's green.
>> >
>> > I am using the latest code from source.mvista.com on omap3430sdp. Does
>> > anybody encounter this problem ?
>> >
>> > Thanks
>> > Stanley.
>> >
>> >
>> > On Wed, 2008-08-27 at 19:57 +0530, iqbal wrote:
>> >> > The linux bootup logo is green, and LCD is dark. It looks like backlight
>> >> > disabled.
>> >> >
>> >> > I commented the following two sentences in lcd_2430.c, there is still
>> >> > the same thing. It seems these two sentences doesn't work.
>> >> >
>> >> >  96 omap_set_gpio_dataout(enable_gpio, 1);
>> >> >  97 omap_set_gpio_dataout(backlight_gpio, 1);
>> >> >
>> >> > Both the the latest kernels from omapzoom.org and linux-omap-2.6 have
>> >> > this problem.  However, the old version in linux-omap-2.6, 2.6.21,
>> >> > doesn't have this problem.
>> >> >
>> >> > Stanley.
>> >>
>> >> If I use this piece of code in panel suspend and resume, I see that the 
>> >> panel
>> >> backlight is going off on suspend and comes back while calling resume. 
>> >> Give a
>> >> try .
>> >>
>> >>  static int sdp2430_panel_suspend(struct platform_device *pdev, 
>> >> pm_message_t mesg)
>> >>  {
>> >> +   omap_set_gpio_dataout(backlight_gpio, 0);
>> >> +   twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,0x0,
>> >> +   TWL4030_VPLL2_DEDICATED);
>> >> +   twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,0x0,
>> >> +   TWL4030_VPLL2_DEV_GRP);
>> >> +   mdelay(4);
>> >> return 0;
>> >>  }
>> >>
>> >>  static int sdp2430_panel_resume(struct platform_device *pdev)
>> >>  {
>> >> +   if (lcd_in_use)
>> >> +   return 0;
>> >> +   twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
>> >> +   ENABLE_VPLL2_DEDICATED,TWL4030_VPLL2_DEDICATED);
>> >> +   twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER,
>> >> +   ENABLE_VPLL2_DEV_GRP,TWL4030_VPLL2_DEV_GRP);
>> >> +   omap_set_gpio_dataout(backlight_gpio, 1);
>> >> +
>> >> return 0;
>> >>  }
>> >>
>> >> >
>> >> > --
>> >> > To unsubscribe from this list: send the line "unsubscribe linux-omap" in
>> >> > the body of a message to [EMAIL PROTECTED]
>> >> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> >> >
>> >> >
>> >>
>> >>
>> >> --
>> >> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
>> >> the body of a message to [EMAIL PROTECTED]
>> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> > --
>> > To unsubscribe from this list: send the line "unsubscribe linux-omap" in
>> > the body of a message to [EMAIL PROTECTED]
>> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> >
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


GUI for OMAP3EVM

2008-08-28 Thread arun c
Hi All,

I want to have a GUI on OMAP3EVM.
Basically I am looking for a GUI stack that can work on top of linux framebuffer
device(Eg: DirectFb).

X window based GUI is not suitable for embedded
devices, am I right?

Does any body tried this?

Regards,
Arun C
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: USB-webcam support

2008-08-12 Thread arun c
On Tue, Aug 12, 2008 at 4:20 PM, Gadiyar, Anand <[EMAIL PROTECTED]> wrote:
>> Hi All,
>>
>> If I have a USB camera with good Linux support, can I connect it
>> to omap3evm(or any omap2) and make it functional?
>
> I don't see why not. Do you expect a problem with using it? You could
> use MUSB in host or OTG mode and connect the camera to the MUSB port.
>
I have a Creative webcam and a fedora9 host machine. If I connect
my webcam to my PC it happily gives me /dev/video0 to play with(I can grab
photos, use xawtv). Can I expect the same with the OMAP3EVM?


Regards,
Arun C
> - Anand--
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


USB-webcam support

2008-08-12 Thread arun c
Hi All,

If I have a USB camera with good Linux support, can I connect it
to omap3evm(or any omap2) and make it functional?

Regards,
Arun C
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/2] OMAP2EVM: twl4030 keypad Kconfig dependency fix

2008-08-12 Thread arun c
OMAP2EVM keypad is controlled by twl4030

Signed-off-by: Arun C <[EMAIL PROTECTED]>
---
 drivers/input/keyboard/Kconfig |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
index cf86a7b..e4d0436 100644
--- a/drivers/input/keyboard/Kconfig
+++ b/drivers/input/keyboard/Kconfig
@@ -261,7 +261,7 @@ config KEYBOARD_OMAP

 config KEYBOARD_TWL4030
tristate "TI TWL4030 keypad support"
-   depends on TWL4030_CORE && (MACH_OMAP_2430SDP || MACH_OMAP_3430SDP
|| MACH_OMAP3EVM)
+   depends on TWL4030_CORE && (MACH_OMAP_2430SDP || MACH_OMAP2EVM ||
MACH_OMAP_3430SDP || MACH_OMAP3EVM)
help
  Say Y here if you want to use the OMAP TWL4030 keypad.

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


[PATCH 1/2] OMAP2EVM: Add keypad support

2008-08-12 Thread arun c
TWL4030 keypad controller driver support for OMAP2EVM

Signed-off-by: Arun C <[EMAIL PROTECTED]>
---
 arch/arm/mach-omap2/board-omap2evm.c |   38 ++
 1 files changed, 38 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap2evm.c
b/arch/arm/mach-omap2/board-omap2evm.c
index b6354e3..9eb93b6 100644
--- a/arch/arm/mach-omap2/board-omap2evm.c
+++ b/arch/arm/mach-omap2/board-omap2evm.c
@@ -17,6 +17,7 @@
 #include 
 #include 
 #include 
+#include 

 #include 
 #include 
@@ -27,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 

 static struct resource omap2evm_smc911x_resources[] = {
[0] =   {
@@ -72,6 +74,41 @@ static struct omap_lcd_config omap2_evm_lcd_config
__initdata = {
.ctrl_name  = "internal",
 };

+static int omap2evm_keymap[] = {
+   KEY(0, 0, KEY_LEFT),
+   KEY(0, 1, KEY_RIGHT),
+   KEY(0, 2, KEY_A),
+   KEY(0, 3, KEY_B),
+   KEY(1, 0, KEY_DOWN),
+   KEY(1, 1, KEY_UP),
+   KEY(1, 2, KEY_E),
+   KEY(1, 3, KEY_F),
+   KEY(2, 0, KEY_ENTER),
+   KEY(2, 1, KEY_I),
+   KEY(2, 2, KEY_J),
+   KEY(2, 3, KEY_K),
+   KEY(3, 0, KEY_M),
+   KEY(3, 1, KEY_N),
+   KEY(3, 2, KEY_O),
+   KEY(3, 3, KEY_P)
+};
+
+static struct omap_kp_platform_data omap2evm_kp_data = {
+   .rows   = 4,
+   .cols   = 4,
+   .keymap = omap2evm_keymap,
+   .keymapsize = ARRAY_SIZE(omap2evm_keymap),
+   .rep= 1,
+};
+
+static struct platform_device omap2evm_kp_device = {
+   .name   = "omap_twl4030keypad",
+   .id = -1,
+   .dev= {
+   .platform_data = &omap2evm_kp_data,
+   },
+};
+
 static void __init omap2_evm_init_irq(void)
 {
omap2_init_common_hw(NULL);
@@ -111,6 +148,7 @@ static int __init omap2_evm_i2c_init(void)
 static struct platform_device *omap2_evm_devices[] __initdata = {
&omap2_evm_lcd_device,
&omap2evm_smc911x_device,
+   &omap2evm_kp_device,
 };

 static void __init omap2_evm_init(void)
-- 
1.5.3.4
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/2] OMAP2EVM: Add twl4030 keypad support

2008-08-12 Thread arun c
Hi all,

The following set of patches adds twl4030 keypad support for omap2evm.

Regards,
Arun C
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: About to tag v2.6.26-omap1, patch queue deleted, please check and repost

2008-08-06 Thread arun c
On Tue, Aug 5, 2008 at 11:41 PM, Dirk Behme <[EMAIL PROTECTED]> wrote:
> Gadiyar, Anand wrote:
>>>
>>> Hi all,
>>>
>>> I've pushed all the patches I have in my omap inbox, except for
>>> the omap serial driver that I want to look more.
>>>
>>> I've tried to comment on the ones that did not get pushed, then
>>> erased everything from my omap inbox. Some drivers should get
>>> integrated via other mailing lists, and some debug patches can
>>> probably stay as debug patches, and some patches I probably
>>> have accidentally deleted :) And the PM patches I lost track of,
>>> so those should be reposted.
>>>
>>> So please check your patches, and repost your patches if something
>>> is left out. Also please check that things work for your board,
>>> let's try to tag v2.6.26-omap1 within next few days so we can
>>> move on again.
>>>
>>> Cheers,
>>>
>>> Tony
>>
>>
>> Boot tested on 3430SDP with the defconfig. Things work okay so far.
>
> Same with BeagleBoard.
>
> Dirk
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

Hi all,

Boot tested on omap2evm with defconfig.
The printks from omapfb(irq errors) is stalling the console sometimes, otherwise
everything seems to be fine.

Regards,
Arun C
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Resending - PATCH] OMAP2EVM: add LCD panel support

2008-08-05 Thread arun c
omap2evm LCD supports VGA and QVGA resolution, by default its in VGA mode.

Signed-off-by: Arun C <[EMAIL PROTECTED]>
---
 arch/arm/mach-omap2/board-omap2evm.c |   15 +++-
 drivers/video/omap/Makefile  |2 +
 drivers/video/omap/lcd_omap2evm.c|  195 ++
 3 files changed, 210 insertions(+), 2 deletions(-)
 create mode 100644 drivers/video/omap/lcd_omap2evm.c

diff --git a/arch/arm/mach-omap2/board-omap2evm.c
b/arch/arm/mach-omap2/board-omap2evm.c
index 0baf704..13c53cc 100644
--- a/arch/arm/mach-omap2/board-omap2evm.c
+++ b/arch/arm/mach-omap2/board-omap2evm.c
@@ -62,6 +62,15 @@ static inline void __init omap2evm_init_smc911x(void)

 }

+static struct platform_device omap2_evm_lcd_device = {
+   .name   = "omap2evm_lcd",
+   .id = -1,
+};
+
+static struct omap_lcd_config omap2_evm_lcd_config __initdata = {
+   .ctrl_name  = "internal",
+};
+
 static void __init omap2_evm_init_irq(void)
 {
omap2_init_common_hw(NULL);
@@ -75,7 +84,8 @@ static struct omap_uart_config omap2_evm_uart_config
__initdata = {
 };

 static struct omap_board_config_kernel omap2_evm_config[] __initdata = {
-   {OMAP_TAG_UART, &omap2_evm_uart_config},
+   { OMAP_TAG_UART,&omap2_evm_uart_config },
+   { OMAP_TAG_LCD, &omap2_evm_lcd_config },
 };

 static int __init omap2_evm_i2c_init(void)
@@ -90,7 +100,8 @@ static int __init omap2_evm_i2c_init(void)
 }

 static struct platform_device *omap2_evm_devices[] __initdata = {
-&omap2evm_smc911x_device,
+   &omap2_evm_lcd_device,
+   &omap2evm_smc911x_device,
 };

 static void __init omap2_evm_init(void)
diff --git a/drivers/video/omap/Makefile b/drivers/video/omap/Makefile
index fe7ee5d..662dff9 100644
--- a/drivers/video/omap/Makefile
+++ b/drivers/video/omap/Makefile
@@ -31,6 +31,8 @@ objs-y$(CONFIG_MACH_SX1) += lcd_sx1.o
 objs-y$(CONFIG_MACH_OMAP_APOLLON) += lcd_apollon.o
 objs-y$(CONFIG_MACH_OMAP_2430SDP) += lcd_2430sdp.o
 objs-y$(CONFIG_MACH_OMAP_3430SDP) += lcd_2430sdp.o
+objs-y$(CONFIG_MACH_OMAP2EVM) += lcd_omap2evm.o
+objs-y$(CONFIG_MACH_OMAP_3430SDP) += lcd_3430sdp.o
 objs-y$(CONFIG_MACH_OMAP3EVM) += lcd_omap3evm.o
 objs-y$(CONFIG_MACH_OMAP3_BEAGLE) += lcd_omap3beagle.o
 objs-y$(CONFIG_FB_OMAP_LCD_MIPID) += lcd_mipid.o
diff --git a/drivers/video/omap/lcd_omap2evm.c
b/drivers/video/omap/lcd_omap2evm.c
new file mode 100644
index 000..8311cac
--- /dev/null
+++ b/drivers/video/omap/lcd_omap2evm.c
@@ -0,0 +1,195 @@
+/*
+ * LCD panel support for the MISTRAL OMAP2EVM board
+ *
+ * Author: Arun C <[EMAIL PROTECTED]>
+ *
+ * Derived from drivers/video/omap/lcd_omap3evm.c
+ * Derived from drivers/video/omap/lcd-apollon.c
+ *
+ * This program 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.
+ *
+ * This program 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 program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#define LCD_PANEL_ENABLE_GPIO  154
+#define LCD_PANEL_LR   128
+#define LCD_PANEL_UD   129
+#define LCD_PANEL_INI  152
+#define LCD_PANEL_QVGA 148
+#define LCD_PANEL_RESB 153
+
+#define LCD_XRES   480
+#define LCD_YRES   640
+#define LCD_PIXCLOCK_MAX   2 /* in kHz */
+
+#define TWL_LED_LEDEN  0x00
+#define TWL_PWMA_PWMAON0x00
+#define TWL_PWMA_PWMAOFF   0x01
+
+static unsigned int bklight_level;
+
+static int omap2evm_panel_init(struct lcd_panel *panel,
+   struct omapfb_device *fbdev)
+{
+   omap_request_gpio(LCD_PANEL_ENABLE_GPIO);
+   omap_request_gpio(LCD_PANEL_LR);
+   omap_request_gpio(LCD_PANEL_UD);
+   omap_request_gpio(LCD_PANEL_INI);
+   omap_request_gpio(LCD_PANEL_QVGA);
+   omap_request_gpio(LCD_PANEL_RESB);
+
+   omap_set_gpio_direction(LCD_PANEL_ENABLE_GPIO, 0);
+   omap_set_gpio_direction(LCD_PANEL_LR, 0);
+   omap_set_gpio_direction(LCD_PANEL_UD, 0);
+   omap_set_gpio_direction(LCD_PANEL_INI, 0);
+   omap_set_gpio_direction(LCD_PANEL_QVGA, 0);
+   omap_set_gpio_direction(LCD_PANEL_RESB, 0);
+
+   omap_set_gpio_dataout(LCD_PANEL_RESB, 1);
+   omap_set_gpio_dataout(LCD_PANEL_INI, 1);
+   omap_set_gpio_dataout(LCD_PANEL_QVGA, 0);
+   omap_set_gpio_dataout(LCD_PAN

Re: Does DSS support 24 bits_per_pixel?

2008-07-31 Thread arun c
On Tue, Jul 29, 2008 at 5:25 PM, Syed Mohammed, Khasim <[EMAIL PROTECTED]> 
wrote:
>
>
>> -Original Message-----
>> From: arun c [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, July 29, 2008 5:11 PM
>> To: Syed Mohammed, Khasim
>> Cc: linux-omap@vger.kernel.org
>> Subject: Re: Does DSS support 24 bits_per_pixel?
>>
>> On Tue, Jul 29, 2008 at 4:37 PM, Syed Mohammed, Khasim <[EMAIL PROTECTED]> 
>> wrote:
>> >
>> >> Hi all,
>> >>
>> >> Does omap (2&3) DSS support 24 bit output?
>> >>
>> >> I was trying to enable DVI support for omap2evm(data lines=24, bits
>> >> per pixel =24), I couldn't find
>> >> 24 bit support in omapfb driver(git) and 
>> >> omap24xxfb(linux-2.6.14-omap2-v5).
>> >>
>> >> In TRM its given that it supports 24 BPP. Then why its absent in both
>> >> the drivers?. Does the hardware
>> >> really support 24 bit format?
>> >>
>> > Hardware does support RGB 24 packed and unpacked modes.
>> >
>> > In TI code it is implemented in V4L based Video driver and also in FB 
>> > driver,
>> omap2_disp_config_gfxlayer selects the bpp and configures 
>> DISPC_GFX_ATTRIBUTES register accordingly.
>> >
>>
>> But in the TI code,
>>
>> omap24xxfb_check_mode(const struct omap24xxfb_info *oinfo,
>>   struct fb_var_screeninfo *var)
>> {
>> u32 pixclock, clkdiv;
>> u32 display_xres, display_yres;
>> int output_dev = omap2_disp_get_output_dev(OMAP2_GRAPHICS);
>>
>> omap2_disp_get_panel_size(output_dev, &display_xres, &display_yres);
>> if (oinfo->rotation_support) {
>>
>> if (var->rotate % 90 != 0)
>> return -EINVAL;
>>
>> if (!((var->bits_per_pixel == 8) ||
>>   (var->bits_per_pixel == 16)))
>> return -EINVAL;
>>
>
> As this was the last update for OMAP2 platforms, I expect it to have support 
> for 24 as well. I am downloading the code base to check for the same. In the 
> latest code for 3530 I have
>if (!((var->bits_per_pixel == 8) ||
>(var->bits_per_pixel == 16)||
>(var->bits_per_pixel == 32))) {
>
> Actually you can even refer to omap3530 code base and port this functionality 
> to OMAP2.
>

Yes DVI worked for me, needed some minor changes to omapfb driver though.
I used 24 bits unpacked mode.

Thanks Khasim for the help.

> Regards,
> Khasim
> http://khasim.blogspot.com
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Does DSS support 24 bits_per_pixel?

2008-07-29 Thread arun c
On Tue, Jul 29, 2008 at 4:37 PM, Syed Mohammed, Khasim <[EMAIL PROTECTED]> 
wrote:
>
>> Hi all,
>>
>> Does omap (2&3) DSS support 24 bit output?
>>
>> I was trying to enable DVI support for omap2evm(data lines=24, bits
>> per pixel =24), I couldn't find
>> 24 bit support in omapfb driver(git) and omap24xxfb(linux-2.6.14-omap2-v5).
>>
>> In TRM its given that it supports 24 BPP. Then why its absent in both
>> the drivers?. Does the hardware
>> really support 24 bit format?
>>
> Hardware does support RGB 24 packed and unpacked modes.
>
> In TI code it is implemented in V4L based Video driver and also in FB driver, 
> omap2_disp_config_gfxlayer selects the bpp and configures 
> DISPC_GFX_ATTRIBUTES register accordingly.
>

But in the TI code,

omap24xxfb_check_mode(const struct omap24xxfb_info *oinfo,
  struct fb_var_screeninfo *var)
{
u32 pixclock, clkdiv;
u32 display_xres, display_yres;
int output_dev = omap2_disp_get_output_dev(OMAP2_GRAPHICS);

omap2_disp_get_panel_size(output_dev, &display_xres, &display_yres);
if (oinfo->rotation_support) {

if (var->rotate % 90 != 0)
return -EINVAL;

if (!((var->bits_per_pixel == 8) ||
  (var->bits_per_pixel == 16)))
return -EINVAL;

in the check var fn it returns -EINVAL if it encounters any bpp other
than 16 or 8

I am using linux-2.6.14-omap2-v5 from TI website, whether this is the
correct version?


> Regards,
> Khasim
> http://khasim.blogspot.com
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Does DSS support 24 bits_per_pixel?

2008-07-28 Thread arun c
Hi all,

Does omap (2&3) DSS support 24 bit output?

I was trying to enable DVI support for omap2evm(data lines=24, bits
per pixel =24), I couldn't find
24 bit support in omapfb driver(git) and omap24xxfb(linux-2.6.14-omap2-v5).

In TRM its given that it supports 24 BPP. Then why its absent in both
the drivers?. Does the hardware
really support 24 bit format?

Regards,
Arun C
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] OMAP2EVM: add LCD panel support

2008-07-03 Thread arun c
omap2evm LCD supports VGA and QVGA resolution, by default its in VGA mode.

Signed-off-by: Arun C <[EMAIL PROTECTED]>
---
 arch/arm/mach-omap2/board-omap2evm.c |   15 +++-
 drivers/video/omap/Makefile  |1 +
 drivers/video/omap/lcd_omap2evm.c|  195 ++
 3 files changed, 209 insertions(+), 2 deletions(-)
 create mode 100644 drivers/video/omap/lcd_omap2evm.c

diff --git a/arch/arm/mach-omap2/board-omap2evm.c
b/arch/arm/mach-omap2/board-omap2evm.c
index bcdf4a6..db1c4cb 100644
--- a/arch/arm/mach-omap2/board-omap2evm.c
+++ b/arch/arm/mach-omap2/board-omap2evm.c
@@ -62,6 +62,15 @@ static inline void __init omap2evm_init_smc911x(void)

 }

+static struct platform_device omap2_evm_lcd_device = {
+   .name   = "omap2evm_lcd",
+   .id = -1,
+};
+
+static struct omap_lcd_config omap2_evm_lcd_config __initdata = {
+   .ctrl_name  = "internal",
+};
+
 static void __init omap2_evm_init_irq(void)
 {
omap2_init_common_hw();
@@ -75,7 +84,8 @@ static struct omap_uart_config omap2_evm_uart_config
__initdata = {
 };

 static struct omap_board_config_kernel omap2_evm_config[] __initdata = {
-   {OMAP_TAG_UART, &omap2_evm_uart_config},
+   { OMAP_TAG_UART,&omap2_evm_uart_config },
+   { OMAP_TAG_LCD, &omap2_evm_lcd_config },
 };

 static int __init omap2_evm_i2c_init(void)
@@ -90,7 +100,8 @@ static int __init omap2_evm_i2c_init(void)
 }

 static struct platform_device *omap2_evm_devices[] __initdata = {
-&omap2evm_smc911x_device,
+   &omap2_evm_lcd_device,
+   &omap2evm_smc911x_device,
 };

 static void __init omap2_evm_init(void)
diff --git a/drivers/video/omap/Makefile b/drivers/video/omap/Makefile
index a72a2d9..e234d5f 100644
--- a/drivers/video/omap/Makefile
+++ b/drivers/video/omap/Makefile
@@ -30,6 +30,7 @@ objs-y$(CONFIG_MACH_SX1) += lcd_sx1.o

 objs-y$(CONFIG_MACH_OMAP_APOLLON) += lcd_apollon.o
 objs-y$(CONFIG_MACH_OMAP_2430SDP) += lcd_2430sdp.o
+objs-y$(CONFIG_MACH_OMAP2EVM) += lcd_omap2evm.o
 objs-y$(CONFIG_MACH_OMAP_3430SDP) += lcd_3430sdp.o
 objs-y$(CONFIG_MACH_OMAP3EVM) += lcd_omap3evm.o
 objs-y$(CONFIG_MACH_OMAP3_BEAGLE) += lcd_omap3beagle.o
diff --git a/drivers/video/omap/lcd_omap2evm.c
b/drivers/video/omap/lcd_omap2evm.c
new file mode 100644
index 000..d834640
--- /dev/null
+++ b/drivers/video/omap/lcd_omap2evm.c
@@ -0,0 +1,195 @@
+/*
+ * LCD panel support for the MISTRAL OMAP2EVM board
+ *
+ * Author: Arun C <[EMAIL PROTECTED]>
+ *
+ * Derived from drivers/video/omap/lcd_omap3evm.c
+ * Derived from drivers/video/omap/lcd-apollon.c
+ *
+ * This program 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.
+ *
+ * This program 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 program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#define LCD_PANEL_ENABLE_GPIO  154
+#define LCD_PANEL_LR   128
+#define LCD_PANEL_UD   129
+#define LCD_PANEL_INI  152
+#define LCD_PANEL_QVGA 148
+#define LCD_PANEL_RESB 153
+
+#define LCD_XRES   480
+#define LCD_YRES   640
+#define LCD_PIXCLOCK   2 /* in kHz */
+
+#define TWL_LED_LEDEN  0x00
+#define TWL_PWMA_PWMAON0x00
+#define TWL_PWMA_PWMAOFF   0x01
+
+static unsigned int bklight_level;
+
+static int omap2evm_panel_init(struct lcd_panel *panel,
+   struct omapfb_device *fbdev)
+{
+   omap_request_gpio(LCD_PANEL_ENABLE_GPIO);
+   omap_request_gpio(LCD_PANEL_LR);
+   omap_request_gpio(LCD_PANEL_UD);
+   omap_request_gpio(LCD_PANEL_INI);
+   omap_request_gpio(LCD_PANEL_QVGA);
+   omap_request_gpio(LCD_PANEL_RESB);
+
+   omap_set_gpio_direction(LCD_PANEL_ENABLE_GPIO, 0);
+   omap_set_gpio_direction(LCD_PANEL_LR, 0);
+   omap_set_gpio_direction(LCD_PANEL_UD, 0);
+   omap_set_gpio_direction(LCD_PANEL_INI, 0);
+   omap_set_gpio_direction(LCD_PANEL_QVGA, 0);
+   omap_set_gpio_direction(LCD_PANEL_RESB, 0);
+
+   omap_set_gpio_dataout(LCD_PANEL_RESB, 1);
+   omap_set_gpio_dataout(LCD_PANEL_INI, 1);
+   omap_set_gpio_dataout(LCD_PANEL_QVGA, 0);
+   omap_set_gpio_dataout(LCD_PANEL_LR, 1);
+   omap_set_gpio_dataout(LCD_PANEL_UD, 1);
+
+   twl4030_i2c_write_u8(TWL4030_MODULE_LED, 0x11, TWL_LED_

[PATCH 0 /1] Backlight control for omap3evm

2008-07-01 Thread arun c
Hi all ,

The following patch adds backlight control for omap3evm
User can vary the backlight from 0% to 100% through sysfs.

To test execute.

 a) # echo 0 > /sys/devices/platform/omapfb/panel/backlight_level
  This will turn off the backlight
 b) # echo 100 > /sys/devices/platform/omapfb/panel/backlight_level
  This will give maximum brightness

Regards,
Arun C
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/1] This patch adds backlight control for omap3evm

2008-07-01 Thread arun c
TWL4030 LEDdriver A(LEDA) is used here to control the LCD backlight

Signed-off-by: Arun C <[EMAIL PROTECTED]>
---
 drivers/video/omap/lcd_omap3evm.c |   39 +---
 1 files changed, 35 insertions(+), 4 deletions(-)

diff --git a/drivers/video/omap/lcd_omap3evm.c
b/drivers/video/omap/lcd_omap3evm.c
index 5d2ed04..f5a1477 100644
--- a/drivers/video/omap/lcd_omap3evm.c
+++ b/drivers/video/omap/lcd_omap3evm.c
@@ -45,6 +45,12 @@
 #define ENABLE_VPLL2_DEDICATED 0x05
 #define ENABLE_VPLL2_DEV_GRP   0xE0

+#define TWL_LED_LEDEN  0x00
+#define TWL_PWMA_PWMAON0x00
+#define TWL_PWMA_PWMAOFF   0x01
+
+static unsigned int bklight_level;
+
 static int omap3evm_panel_init(struct lcd_panel *panel,
struct omapfb_device *fbdev)
 {
@@ -60,10 +66,10 @@ static int omap3evm_panel_init(struct lcd_panel *panel,
omap_set_gpio_direction(LCD_PANEL_RESB, 0);
omap_set_gpio_direction(LCD_PANEL_QVGA, 0);

-   twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, 0x7F, 0);
-   twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, 0x7F, 1);
-   twl4030_i2c_write_u8(TWL4030_MODULE_PWMB, 0x7F, 0);
-   twl4030_i2c_write_u8(TWL4030_MODULE_PWMB, 0x7F, 1);
+   twl4030_i2c_write_u8(TWL4030_MODULE_LED, 0x11, TWL_LED_LEDEN);
+   twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, 0x01, TWL_PWMA_PWMAON);
+   twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, 0x02, TWL_PWMA_PWMAOFF);
+   bklight_level = 100;

omap_set_gpio_dataout(LCD_PANEL_RESB, 1);
omap_set_gpio_dataout(LCD_PANEL_INI, 1);
@@ -94,6 +100,28 @@ static unsigned long
omap3evm_panel_get_caps(struct lcd_panel *panel)
return 0;
 }

+static int omap3evm_bklight_setlevel(struct lcd_panel *panel,
+   unsigned int level)
+{
+   u8 c;
+   if ((level >= 0) && (level <= 100)) {
+   c = (125 * (100 - level)) / 100 + 2;
+   twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, c, TWL_PWMA_PWMAOFF);
+   bklight_level = level;
+   }
+   return 0;
+}
+
+static unsigned int omap3evm_bklight_getlevel(struct lcd_panel *panel)
+{
+   return bklight_level;
+}
+
+static unsigned int omap3evm_bklight_getmaxlevel(struct lcd_panel *panel)
+{
+   return 100;
+}
+
 struct lcd_panel omap3evm_panel = {
.name   = "omap3evm",
.config = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC |
@@ -117,6 +145,9 @@ struct lcd_panel omap3evm_panel = {
.enable = omap3evm_panel_enable,
.disable= omap3evm_panel_disable,
.get_caps   = omap3evm_panel_get_caps,
+   .set_bklight_level  = omap3evm_bklight_setlevel,
+   .get_bklight_level  = omap3evm_bklight_getlevel,
+   .get_bklight_max= omap3evm_bklight_getmaxlevel,
 };

 static int omap3evm_panel_probe(struct platform_device *pdev)
-- 
1.5.5.3
From 92a1094c65e90ae0f0fe5b970f733d584d2f7201 Mon Sep 17 00:00:00 2001
From: Arun C <[EMAIL PROTECTED]>
Date: Tue, 1 Jul 2008 16:54:55 +0530
Subject: [PATCH] This patch adds backlight control for omap3evm

TWL4030 LEDdriver A(LEDA) is used here to control the LCD backlight

Signed-off-by: Arun C <[EMAIL PROTECTED]>
---
 drivers/video/omap/lcd_omap3evm.c |   39 +---
 1 files changed, 35 insertions(+), 4 deletions(-)

diff --git a/drivers/video/omap/lcd_omap3evm.c b/drivers/video/omap/lcd_omap3evm.c
index 5d2ed04..f5a1477 100644
--- a/drivers/video/omap/lcd_omap3evm.c
+++ b/drivers/video/omap/lcd_omap3evm.c
@@ -45,6 +45,12 @@
 #define ENABLE_VPLL2_DEDICATED	0x05
 #define ENABLE_VPLL2_DEV_GRP	0xE0
 
+#define TWL_LED_LEDEN		0x00
+#define TWL_PWMA_PWMAON		0x00
+#define TWL_PWMA_PWMAOFF	0x01
+
+static unsigned int bklight_level;
+
 static int omap3evm_panel_init(struct lcd_panel *panel,
 struct omapfb_device *fbdev)
 {
@@ -60,10 +66,10 @@ static int omap3evm_panel_init(struct lcd_panel *panel,
 	omap_set_gpio_direction(LCD_PANEL_RESB, 0);
 	omap_set_gpio_direction(LCD_PANEL_QVGA, 0);
 
-	twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, 0x7F, 0);
-	twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, 0x7F, 1);
-	twl4030_i2c_write_u8(TWL4030_MODULE_PWMB, 0x7F, 0);
-	twl4030_i2c_write_u8(TWL4030_MODULE_PWMB, 0x7F, 1);
+	twl4030_i2c_write_u8(TWL4030_MODULE_LED, 0x11, TWL_LED_LEDEN);
+	twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, 0x01, TWL_PWMA_PWMAON);
+	twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, 0x02, TWL_PWMA_PWMAOFF);
+	bklight_level = 100;
 
 	omap_set_gpio_dataout(LCD_PANEL_RESB, 1);
 	omap_set_gpio_dataout(LCD_PANEL_INI, 1);
@@ -94,6 +100,28 @@ static unsigned long omap3evm_panel_get_caps(struct lcd_panel *panel)
 	return 0;
 }
 
+static int omap3evm_bklight_setlevel(struct lcd_panel *panel,
+		unsigned int level)
+{
+	u8 c;
+	if ((level >= 0) && (level <= 100)) {
+		c = (125 * (100 - level)) / 100 + 2;
+		twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, c, TWL_PWMA_PWMAOFF)

Re: [PATCH 1/3] OMAP3 EVM: Add twl4030 keypad driver support

2008-06-25 Thread arun c
On Wed, Jun 25, 2008 at 8:43 PM, Miguel Angel Aguilar Ulloa
<[EMAIL PROTECTED]> wrote:
> The OMAP3 EVM has 15 keys arranged in a matrix from SW4 to SW18, but it also
> has a user key (power on/off) in SW3, this key is included in the keypad
> mapping. This is how mapping is done in an 4x4 array.
>
> arun c wrote:
>>
>> On Tue, Jun 24, 2008 at 3:21 AM, Miguel Angel Aguilar Ulloa
>> <[EMAIL PROTECTED]> wrote:
>>>
>>> Add twl4030 keypad driver support to OMAP3 EVM
>>>
>>> Signed-off-by: Miguel Angel Aguilar <[EMAIL PROTECTED]>
>>>
>>> --- a/arch/arm/mach-omap2/board-omap3evm.c  2008-06-23
>>> 15:07:13.0 -0600
>>> +++ b/arch/arm/mach-omap2/board-omap3evm.c  2008-06-23
>>> 14:32:29.0 -0600
>>> @@ -19,6 +19,7 @@
>>> #include 
>>> #include 
>>> #include 
>>> +#include 
>>> #include 
>>> #include 
>>>
>>> @@ -28,6 +29,7 @@
>>> #include 
>>>
>>> #include 
>>> +#include 
>>> #include 
>>> #include 
>>> #include 
>>> @@ -149,6 +151,56 @@ struct spi_board_info omap3evm_spi_board
>>>   },
>>> };
>>>

Yes option is there to add sw3 to key matrix. So we have a total of 16
keys, then
why there are more no of keys(30keys) in omap3evm_keymap[] array?


>>> +static int omap3evm_keymap[] = {
>>> +   KEY(0, 0, KEY_LEFT),
>>> +   KEY(0, 1, KEY_RIGHT),
>>> +   KEY(0, 2, KEY_A),
>>> +   KEY(0, 3, KEY_B),
>>> +   KEY(0, 4, KEY_C),
>>> +   KEY(1, 0, KEY_DOWN),
>>> +   KEY(1, 1, KEY_UP),
>>> +   KEY(1, 2, KEY_E),
>>> +   KEY(1, 3, KEY_F),
>>> +   KEY(1, 4, KEY_G),
>>> +   KEY(2, 0, KEY_ENTER),
>>> +   KEY(2, 1, KEY_I),
>>> +   KEY(2, 2, KEY_J),
>>> +   KEY(2, 3, KEY_K),
>>> +   KEY(2, 4, KEY_3),
>>> +   KEY(3, 0, KEY_M),
>>> +   KEY(3, 1, KEY_N),
>>> +   KEY(3, 2, KEY_O),
>>> +   KEY(3, 3, KEY_P),
>>> +   KEY(3, 4, KEY_Q),
>>> +   KEY(4, 0, KEY_R),
>>> +   KEY(4, 1, KEY_4),
>>> +   KEY(4, 2, KEY_T),
>>> +   KEY(4, 3, KEY_U),
>>> +   KEY(4, 4, KEY_D),
>>> +   KEY(5, 0, KEY_V),
>>> +   KEY(5, 1, KEY_W),
>>> +   KEY(5, 2, KEY_L),
>>> +   KEY(5, 3, KEY_S),
>>> +   KEY(5, 4, KEY_H),
>>> +   0
>>> +};
>>> +
>>
>> Omap3evm has only 15 keys right?(Some body correct me if I am wrong).
>> Then how the
>> mapping and dividing into rows and columns is done?
>>
>>> +static struct omap_kp_platform_data omap3evm_kp_data = {
>>> +   .rows   = 4,
>>> +   .cols   = 4,
>>> +   .keymap = omap3evm_keymap,
>>> +   .keymapsize = ARRAY_SIZE(omap3evm_keymap),
>>> +   .rep= 1,
>>> +};
>>> +
>>> +static struct platform_device omap3evm_kp_device = {
>>> +   .name   = "omap_twl4030keypad",
>>> +   .id = -1,
>>> +   .dev= {
>>> +   .platform_data = &omap3evm_kp_data,
>>> +   },
>>> +};
>>> +
>>> static void __init omap3_evm_init_irq(void)
>>> {
>>>   omap2_init_common_hw();
>>> @@ -165,6 +217,7 @@ static struct omap_board_config_kernel o
>>>
>>> static struct platform_device *omap3_evm_devices[] __initdata = {
>>>   &omap3_evm_lcd_device,
>>> +   &omap3evm_kp_device,
>>> #ifdef CONFIG_RTC_DRV_TWL4030
>>>   &omap3_evm_twl4030rtc_device,
>>> #endif
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
>>> the body of a message to [EMAIL PROTECTED]
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>
>
>
> --
> Miguel Angel Aguilar Ulloa
> Embedded Software Engineer
> RidgeRun Embedded Solutions
> [EMAIL PROTECTED]
> Office: +(506) 2225-9596
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/3] OMAP3 EVM: Add twl4030 keypad driver support

2008-06-25 Thread arun c
On Tue, Jun 24, 2008 at 3:21 AM, Miguel Angel Aguilar Ulloa
<[EMAIL PROTECTED]> wrote:
> Add twl4030 keypad driver support to OMAP3 EVM
>
> Signed-off-by: Miguel Angel Aguilar <[EMAIL PROTECTED]>
>
> --- a/arch/arm/mach-omap2/board-omap3evm.c  2008-06-23
> 15:07:13.0 -0600
> +++ b/arch/arm/mach-omap2/board-omap3evm.c  2008-06-23
> 14:32:29.0 -0600
> @@ -19,6 +19,7 @@
> #include 
> #include 
> #include 
> +#include 
> #include 
> #include 
>
> @@ -28,6 +29,7 @@
> #include 
>
> #include 
> +#include 
> #include 
> #include 
> #include 
> @@ -149,6 +151,56 @@ struct spi_board_info omap3evm_spi_board
>},
> };
>
> +static int omap3evm_keymap[] = {
> +   KEY(0, 0, KEY_LEFT),
> +   KEY(0, 1, KEY_RIGHT),
> +   KEY(0, 2, KEY_A),
> +   KEY(0, 3, KEY_B),
> +   KEY(0, 4, KEY_C),
> +   KEY(1, 0, KEY_DOWN),
> +   KEY(1, 1, KEY_UP),
> +   KEY(1, 2, KEY_E),
> +   KEY(1, 3, KEY_F),
> +   KEY(1, 4, KEY_G),
> +   KEY(2, 0, KEY_ENTER),
> +   KEY(2, 1, KEY_I),
> +   KEY(2, 2, KEY_J),
> +   KEY(2, 3, KEY_K),
> +   KEY(2, 4, KEY_3),
> +   KEY(3, 0, KEY_M),
> +   KEY(3, 1, KEY_N),
> +   KEY(3, 2, KEY_O),
> +   KEY(3, 3, KEY_P),
> +   KEY(3, 4, KEY_Q),
> +   KEY(4, 0, KEY_R),
> +   KEY(4, 1, KEY_4),
> +   KEY(4, 2, KEY_T),
> +   KEY(4, 3, KEY_U),
> +   KEY(4, 4, KEY_D),
> +   KEY(5, 0, KEY_V),
> +   KEY(5, 1, KEY_W),
> +   KEY(5, 2, KEY_L),
> +   KEY(5, 3, KEY_S),
> +   KEY(5, 4, KEY_H),
> +   0
> +};
> +

Omap3evm has only 15 keys right?(Some body correct me if I am wrong).
Then how the
mapping and dividing into rows and columns is done?

> +static struct omap_kp_platform_data omap3evm_kp_data = {
> +   .rows   = 4,
> +   .cols   = 4,
> +   .keymap = omap3evm_keymap,
> +   .keymapsize = ARRAY_SIZE(omap3evm_keymap),
> +   .rep= 1,
> +};
> +
> +static struct platform_device omap3evm_kp_device = {
> +   .name   = "omap_twl4030keypad",
> +   .id = -1,
> +   .dev= {
> +   .platform_data = &omap3evm_kp_data,
> +   },
> +};
> +
> static void __init omap3_evm_init_irq(void)
> {
>omap2_init_common_hw();
> @@ -165,6 +217,7 @@ static struct omap_board_config_kernel o
>
> static struct platform_device *omap3_evm_devices[] __initdata = {
>&omap3_evm_lcd_device,
> +   &omap3evm_kp_device,
> #ifdef CONFIG_RTC_DRV_TWL4030
>&omap3_evm_twl4030rtc_device,
> #endif
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/3] Adding support for OMAP2EVM(Replacing 2430OSK)

2008-06-11 Thread arun c
On Wed, Jun 11, 2008 at 5:00 PM, Felipe Balbi <[EMAIL PROTECTED]> wrote:
>
>
> On Wed, 11 Jun 2008 16:01:12 +0530, "arun c"
> <[EMAIL PROTECTED]> wrote:
>> Hi all,
>>
>> The following set of patches adds support for
>> Mistral's OMAP2EVM board.
>>
>> a) First patch replaces 2430OSK board files with omap2evm
>> b) Second patch provides compile support
>> c) Third patch completes the name change
>
> The problem will be with the legacy 2430osk, they still provide
> the old 1437 machine id, right ? If you remove all of it users
> won't be able to boot them until upgrading u-boot.
>

Yes, the old machine id is an issue, but peoples(If anybody is
already using 2430osk) can always download the latest
u-boot from www.mistralsolutions.com and use it.(I don't think mistral
supports the old machine id in U-boot anymore).

> Besides they carry a different processor (2430 on osk and 2530
> on evm). Maybe we keep support for both just sharing all board
> files ?
>

As of now all the code written for 2430osk will run on omap2evm also,
so i don't think there is any major issue
which can happen due to this name change.

> board-n810.c shares everything with board-n800, maybe you
> should do something similar?
>
Moreover its the change related to name change from 2430OSK to
OMAP2EVM.(Not actually related to hardware
change like n800 and n810), and Mistral no longer sell boards with the
name 2430OSK all the boards come out with name
OMAP2EVM. Thats why I want the name change from
2430OSK to OMAP2EVM

Regards,
Arun C



> --
> Best Regards,
>
> Felipe Balbi
> http://felipebalbi.com
> [EMAIL PROTECTED]
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/3] Renaming files to reflect name change from 2430OSK to OMAP2EVM

2008-06-11 Thread arun c
>From c379ad7c092bd0230d6c24652a86abb2d8184d64 Mon Sep 17 00:00:00 2001
From: arun <[EMAIL PROTECTED]>
Date: Wed, 11 Jun 2008 14:43:34 +0530
Subject: [PATCH] Renaming files to reflect name change from 2430OSK to OMAP2EVM

renamed:arch/arm/configs/omap_2430osk_defconfig ->
arch/arm/configs/omap2_evm_defconfig
renamed:arch/arm/mach-omap2/board-2430osk.c ->
arch/arm/mach-omap2/board-omap2evm.c
renamed:include/asm-arm/arch-omap/board-2430osk.h ->
include/asm-arm/arch-omap/board-omap2evm.h

Signed-off-by: arun <[EMAIL PROTECTED]>
---
 arch/arm/configs/omap2_evm_defconfig   |  878 
 arch/arm/configs/omap_2430osk_defconfig|  878 
 arch/arm/mach-omap2/board-2430osk.c|  143 -
 arch/arm/mach-omap2/board-omap2evm.c   |  143 +
 include/asm-arm/arch-omap/board-2430osk.h  |   36 --
 include/asm-arm/arch-omap/board-omap2evm.h |   36 ++
 6 files changed, 1057 insertions(+), 1057 deletions(-)
 create mode 100644 arch/arm/configs/omap2_evm_defconfig
 delete mode 100644 arch/arm/configs/omap_2430osk_defconfig
 delete mode 100644 arch/arm/mach-omap2/board-2430osk.c
 create mode 100644 arch/arm/mach-omap2/board-omap2evm.c
 delete mode 100644 include/asm-arm/arch-omap/board-2430osk.h
 create mode 100644 include/asm-arm/arch-omap/board-omap2evm.h

diff --git a/arch/arm/configs/omap2_evm_defconfig
b/arch/arm/configs/omap2_evm_defconfig
new file mode 100644
index 000..12a1298
--- /dev/null
+++ b/arch/arm/configs/omap2_evm_defconfig
@@ -0,0 +1,878 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23-omap1
+# Wed Oct 10 12:21:32 2007
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_VECTORS_BASE=0x
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_BSD_PROCESS_ACCT=y
+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
+# CONFIG_USER_NS is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+# CONFIG_SYSCTL_SYSCALL is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_

[PATCH 3/3] This patch completes the name change from 2430osk to OMAP2EVM

2008-06-11 Thread arun c
>From 11262ea96e0fa73dd3470362b571a33b792bfb09 Mon Sep 17 00:00:00 2001
From: arun <[EMAIL PROTECTED]>
Date: Wed, 11 Jun 2008 15:46:10 +0530
Subject: [PATCH] This patch completes the name change from 2430osk to OMAP2EVM

Also
a) Changed old style i2c registration
b) Changed the Maintainer

Signed-off-by: arun <[EMAIL PROTECTED]>
---
 arch/arm/mach-omap2/board-omap2evm.c   |  111 ++--
 include/asm-arm/arch-omap/board-omap2evm.h |   14 ++--
 2 files changed, 31 insertions(+), 94 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap2evm.c
b/arch/arm/mach-omap2/board-omap2evm.c
index 146dba3..d00e502 100644
--- a/arch/arm/mach-omap2/board-omap2evm.c
+++ b/arch/arm/mach-omap2/board-omap2evm.c
@@ -1,7 +1,7 @@
 /*
- * linux/arch/arm/mach-omap2/board-2430osk.c
+ * linux/arch/arm/mach-omap2/board-omap2evm.c
  *
- * Copyright (C) 2007 Mistral Software Pvt Ltd
+ * Copyright (C) 2008 Mistral Solutions Pvt Ltd
  *
  * Modified from mach-omap2/board-generic.c
  *
@@ -16,6 +16,7 @@
 #include 
 #include 
 #include 
+#include 

 #include 
 #include 
@@ -26,118 +27,54 @@
 #include 
 #include 

-#include 
-
-static void __init omap_2430osk_init_irq(void)
+static void __init omap2_evm_init_irq(void)
 {
omap2_init_common_hw();
omap_init_irq();
omap_gpio_init();
 }

-static struct omap_uart_config osk2430_uart_config __initdata = {
+static struct omap_uart_config omap2_evm_uart_config __initdata = {
.enabled_uarts  = ((1 << 0) | (1 << 1) | (1 << 2)),
 };

-static struct omap_board_config_kernel osk2430_config[] __initdata = {
-
-   {OMAP_TAG_UART, &osk2430_uart_config},
-};
-
-#ifdefined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE)
-
-#define OMAP2_I2C_BASE10x4807
-#define OMAP2_I2C_BASE20x48072000
-#define OMAP2_I2C_INT1 56
-#define OMAP2_I2C_INT2 57
-
-static u32 omap2_i2c1_clkrate  = 400;
-static u32 omap2_i2c2_clkrate  = 2600;
-
-static struct resource i2c_resources1[] = {
-   {
-   .start  = OMAP2_I2C_BASE1,
-   .end= OMAP2_I2C_BASE1 + 0x3f,
-   .flags  = IORESOURCE_MEM,
-   },
-   {
-   .start  = OMAP2_I2C_INT1,
-   .flags  = IORESOURCE_IRQ,
-   },
-};
-
-static struct resource i2c_resources2[] = {
-   {
-   .start  = OMAP2_I2C_BASE2,
-   .end= OMAP2_I2C_BASE2 + 0x3f,
-   .flags  = IORESOURCE_MEM,
-   },
-   {
-   .start  = OMAP2_I2C_INT2,
-   .flags  = IORESOURCE_IRQ,
-   },
+static struct omap_board_config_kernel omap2_evm_config[] __initdata = {
+   {OMAP_TAG_UART, &omap2_evm_uart_config},
 };

-static struct platform_device omap_i2c_device1 = {
-   .name   = "i2c_omap",
-   .id = 1,
-   .num_resources  = ARRAY_SIZE(i2c_resources1),
-   .resource   = i2c_resources1,
-   .dev= {
-   .platform_data  = &omap2_i2c1_clkrate,
-   },
-};
-
-static struct platform_device omap_i2c_device2 = {
-   .name   = "i2c_omap",
-   .id = 2,
-   .num_resources  = ARRAY_SIZE(i2c_resources2),
-   .resource   = i2c_resources2,
-   .dev= {
-   .platform_data  = &omap2_i2c2_clkrate,
-   },
-};
-
-static void omap_init_i2c(void)
-{
-   (void) platform_device_register(&omap_i2c_device2);
-   (void) platform_device_register(&omap_i2c_device1);
-}
-
-#else
-
-static void omap_init_i2c(void) {}
-
-#endif
-
-static int __init omap2430_i2c_init(void)
+static int __init omap2_evm_i2c_init(void)
 {
-   omap_init_i2c();
+   /*
+* Registering bus 2 first to avoid twl4030 misbehaving as OMAP2EVM
+* has twl4030 on bus 2
+*/
+   omap_register_i2c_bus(2, 2600, NULL, 0);
+   omap_register_i2c_bus(1, 400, NULL, 0);
return 0;
 }

-static void __init omap_2430osk_init(void)
+static void __init omap2_evm_init(void)
 {
-   omap_board_config = osk2430_config;
-   omap_board_config_size = ARRAY_SIZE(osk2430_config);
+   omap_board_config = omap2_evm_config;
+   omap_board_config_size = ARRAY_SIZE(omap2_evm_config);
omap_serial_init();
 }

-static void __init omap_2430osk_map_io(void)
+static void __init omap2_evm_map_io(void)
 {
omap2_set_globals_243x();
omap2_map_common_io();
 }

-arch_initcall(omap2430_i2c_init);
+arch_initcall(omap2_evm_i2c_init);

-MACHINE_START(OMAP_2430OSK, "OMAP2430 2430OSK board")
-   /* Maintainer: Syed Khasim */
+MACHINE_START(OMAP2EVM, "OMAP2EVM Board")
+   /* Maintainer:  Arun KS <[EMAIL PROTECTED]> */
.phys_io= 0x4800,
.io_pg_offst= ((0xd800) >> 18) & 0xfffc,
.boot_params= 0x8100,
-   .map_io = omap_2430osk_map_io,
-   .init_irq   = omap_2430osk_init_irq,
-   .init_machine   = omap_2430osk_init,
+   .map_io   

[PATCH 2/3] Adding basic compile support for OMAP2EVM

2008-06-11 Thread arun c
>From f24b517daecd23377d92c706bb28e218431d1887 Mon Sep 17 00:00:00 2001
From: arun <[EMAIL PROTECTED]>
Date: Wed, 11 Jun 2008 14:48:49 +0530
Subject: [PATCH] Adding basic compile support for OMAP2EVM


Signed-off-by: arun <[EMAIL PROTECTED]>
---
 arch/arm/configs/omap2_evm_defconfig |2 +-
 arch/arm/mach-omap2/Kconfig  |4 ++--
 arch/arm/mach-omap2/Makefile |2 +-
 include/asm-arm/arch-omap/hardware.h |4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/configs/omap2_evm_defconfig
b/arch/arm/configs/omap2_evm_defconfig
index 12a1298..38f37d9 100644
--- a/arch/arm/configs/omap2_evm_defconfig
+++ b/arch/arm/configs/omap2_evm_defconfig
@@ -181,7 +181,7 @@ CONFIG_ARCH_OMAP2430=y
 # CONFIG_MACH_OMAP_APOLLON is not set
 # CONFIG_MACH_OMAP_APOLLON_PLUS is not set
 # CONFIG_MACH_OMAP_2430SDP is not set
-CONFIG_MACH_OMAP_2430OSK=y
+CONFIG_MACH_OMAP2EVM=y

 #
 # Boot options
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index ac9a7e1..072aded 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -102,8 +102,8 @@ config MACH_OMAP_LDP
bool "OMAP 3 LDP board"
depends on ARCH_OMAP3 && ARCH_OMAP34XX

-config MACH_OMAP_2430OSK
-   bool "OMAP 2430 OSK board"
+config MACH_OMAP2EVM
+   bool "OMAP 2530 EVM board"
depends on ARCH_OMAP2 && ARCH_OMAP24XX

 config MACH_OMAP_3430SDP
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 5a572b0..4d86f07 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -42,7 +42,7 @@ obj-$(CONFIG_MACH_OMAP_2430SDP)   += 
board-2430sdp.o \
   hsmmc.o \
   usb-musb.o \
   usb-ehci.o
-obj-$(CONFIG_MACH_OMAP_2430OSK)+= board-2430osk.o
+obj-$(CONFIG_MACH_OMAP2EVM)+= board-omap2evm.o
 obj-$(CONFIG_MACH_OMAP_3430SDP)+= board-3430sdp.o \
   hsmmc.o \
   usb-musb.o \
diff --git a/include/asm-arm/arch-omap/hardware.h
b/include/asm-arm/arch-omap/hardware.h
index 513a813..2d44590 100644
--- a/include/asm-arm/arch-omap/hardware.h
+++ b/include/asm-arm/arch-omap/hardware.h
@@ -326,8 +326,8 @@
 #include "board-2430sdp.h"
 #endif

-#ifdef CONFIG_MACH_OMAP_2430OSK
-#include "board-2430osk.h"
+#ifdef CONFIG_MACH_OMAP2EVM
+#include "board-omap2evm.h"
 #endif

 #ifdef CONFIG_MACH_OMAP_3430SDP
-- 
1.5.3.4
From f24b517daecd23377d92c706bb28e218431d1887 Mon Sep 17 00:00:00 2001
From: arun <[EMAIL PROTECTED]>
Date: Wed, 11 Jun 2008 14:48:49 +0530
Subject: [PATCH] Adding basic compile support for OMAP2EVM


Signed-off-by: arun <[EMAIL PROTECTED]>
---
 arch/arm/configs/omap2_evm_defconfig |2 +-
 arch/arm/mach-omap2/Kconfig  |4 ++--
 arch/arm/mach-omap2/Makefile |2 +-
 include/asm-arm/arch-omap/hardware.h |4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/configs/omap2_evm_defconfig b/arch/arm/configs/omap2_evm_defconfig
index 12a1298..38f37d9 100644
--- a/arch/arm/configs/omap2_evm_defconfig
+++ b/arch/arm/configs/omap2_evm_defconfig
@@ -181,7 +181,7 @@ CONFIG_ARCH_OMAP2430=y
 # CONFIG_MACH_OMAP_APOLLON is not set
 # CONFIG_MACH_OMAP_APOLLON_PLUS is not set
 # CONFIG_MACH_OMAP_2430SDP is not set
-CONFIG_MACH_OMAP_2430OSK=y
+CONFIG_MACH_OMAP2EVM=y
 
 #
 # Boot options
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index ac9a7e1..072aded 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -102,8 +102,8 @@ config MACH_OMAP_LDP
 	bool "OMAP 3 LDP board"
 	depends on ARCH_OMAP3 && ARCH_OMAP34XX
 
-config MACH_OMAP_2430OSK
-	bool "OMAP 2430 OSK board"
+config MACH_OMAP2EVM 
+	bool "OMAP 2530 EVM board"
 	depends on ARCH_OMAP2 && ARCH_OMAP24XX
 
 config MACH_OMAP_3430SDP
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 5a572b0..4d86f07 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -42,7 +42,7 @@ obj-$(CONFIG_MACH_OMAP_2430SDP)		+= board-2430sdp.o \
 	   hsmmc.o \
 	   usb-musb.o \
 	   usb-ehci.o
-obj-$(CONFIG_MACH_OMAP_2430OSK)		+= board-2430osk.o
+obj-$(CONFIG_MACH_OMAP2EVM)		+= board-omap2evm.o
 obj-$(CONFIG_MACH_OMAP_3430SDP)		+= board-3430sdp.o \
 	   hsmmc.o \
 	   usb-musb.o \
diff --git a/include/asm-arm/arch-omap/hardware.h b/include/asm-arm/arch-omap/hardware.h
index 513a813..2d44590 100644
--- a/include/asm-arm/arch-omap/hardware.h
+++ b/include/asm-arm/arch-omap/hardware.h
@@ -326,8 +326,8 @@
 #include "board-2430sdp.h"
 #endif
 
-#ifdef CONFIG_MACH_OMAP_2430OSK
-#include "board-2430osk.h"
+#ifdef CONFIG_MACH_OMAP2EVM
+#include "board-omap2evm.h"
 #endif
 
 #ifdef CONFIG_MACH_OMAP_3430SDP
-- 
1.5.3.4



[PATCH 0/3] Adding support for OMAP2EVM(Replacing 2430OSK)

2008-06-11 Thread arun c
Hi all,

The following set of patches adds support for
Mistral's OMAP2EVM board.

a) First patch replaces 2430OSK board files with omap2evm
b) Second patch provides compile support
c) Third patch completes the name change


Regards,
Arun C
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


DISPC register values to eliminate the omapfb irq errors on 2430SDP

2008-06-09 Thread arun c
FYI

By changing the gfx fifo threshold and burst size values
i could able to completely eliminate the omapfb irq
error messages on 2430 SDP board.

I am pasting the changes here for anybody
who wants to try it out.

##

diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c
index 6aff476..4cf83b6 100644
--- a/drivers/video/omap/dispc.c
+++ b/drivers/video/omap/dispc.c
@@ -290,8 +290,8 @@ static void setup_plane_fifo(int plane, int ext_mode)
low = l * 3 / 4;
high = l;
} else {
-   low = l / 4;
-   high = l * 3 / 4;
+   low = l - 64;
+   high = l - 1;
}
MOD_REG_FLD(ftrs_reg[plane], FLD_MASK(16, 9) | FLD_MASK(0, 9),
(high << 16) | low);
@@ -409,7 +409,7 @@ static inline int _setup_plane(int plane, int channel_out,
l |= cconv_en << 9;

l &= ~(0x03 << burst_shift);
-   l |= DISPC_BURST_8x32 << burst_shift;
+   l |= DISPC_BURST_16x32 << burst_shift;

l &= ~(1 << chout_shift);
l |= chout_val << chout_shift;

###

Regards,
Arun C
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Resend][PATCH] Fix for the i2c initialization error on 2430sdp

2008-06-08 Thread arun c
Hi all,

Resending the patch after incorporating comments from
Chandra , Eduardo Valentin and Felipe.




>From ee2a6fd572c6d0464166fc8123982a38b36e7776 Mon Sep 17 00:00:00 2001
From: arun <[EMAIL PROTECTED]>
Date: Fri, 6 Jun 2008 18:18:50 +0530
Subject: [PATCH] Fix for the i2c initialization error on 2430sdp


Signed-off-by: arun <[EMAIL PROTECTED]>
---
 arch/arm/mach-omap2/board-2430sdp.c |6 +-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-2430sdp.c
b/arch/arm/mach-omap2/board-2430sdp.c
index e078a2a..780913e 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -379,8 +379,12 @@ static struct omap_board_config_kernel
sdp2430_config[] __initdata = {

 static int __init omap2430_i2c_init(void)
 {
-   omap_register_i2c_bus(1, 400, NULL, 0);
+   /*
+* Registering bus 2 first to avoid twl4030 misbehaving as 2430SDP
+* has twl4030 on bus 2
+*/
omap_register_i2c_bus(2, 2600, NULL, 0);
+   omap_register_i2c_bus(1, 400, NULL, 0);
return 0;
 }

-- 
1.5.3.4

#
Regards,
Arun C
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Fix for the i2c initialiation error on 2430sdp

2008-06-08 Thread arun c
On Sat, Jun 7, 2008 at 3:23 PM, Chandra shekhar <[EMAIL PROTECTED]> wrote:
>
>> -Original Message-
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] On Behalf Of Koen Kooi
>> Sent: Friday, June 06, 2008 8:59 PM
>> To: Eduardo Valentin
>> Cc: Felipe Balbi; arun c; linux-omap@vger.kernel.org
>> Subject: Re: [PATCH] Fix for the i2c initialiation error on 2430sdp
>>
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>>
>> Op 6 jun 2008, om 16:57 heeft Eduardo Valentin het volgende
>> geschreven:
>>
>> > Hi,
>> >
>> > On Fri, Jun 6, 2008 at 10:46 AM, Felipe Balbi <[EMAIL PROTECTED]>
>> > wrote:
>> >>
>> >>
>> >> On Fri, 6 Jun 2008 18:42:56 +0530, "arun c"
>> >> <[EMAIL PROTECTED]> wrote:
>> >>> static int __init omap2430_i2c_init(void) {
>> >>> - omap_register_i2c_bus(1, 400, NULL, 0);
>> >>>  omap_register_i2c_bus(2, 2600, NULL, 0);
>> >>> + omap_register_i2c_bus(1, 400, NULL, 0);
>> >>
>> >> maybe there's a hw restriction that you must initiliaze hs
>> bus first?
>
>
> There isn't  any hardware restriction while registering the busses. Although 
> we can put a comment

As Chandra shekhar verified there is no hardware restriction,
I will put a comment and resend the patch.

> As to why we are registering the bus 2 first.
> Also itWouldn't matter to 3430 as TWL4030 is on bus 1.
>
>
>> >
>> > If that is the reason, it'd be good to add some comment
>> here to avoid
>> > people re-ordering it in the future.
>>
>> I wonder if this applies to omap3 as well.
>>
>> regards,
>>
>> Koen
>> -BEGIN PGP SIGNATURE-
>> Version: GnuPG v1.4.5 (Darwin)
>>
>>
>
>
> Regards
> Chandra Shekhar
>
Regards,
Arun C
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] Fix for the i2c initialiation error on 2430sdp

2008-06-06 Thread arun c
Hi all,

The patch below fixes the i2c initialization error on 2430sdp.
Now lcd and keyboard is working fine on my 2430sdp board.

It was this commit abda15b1d2a48bb30dd79a7407d4ea8068975318
which introduced the new style i2c registration for 2430sdp(For other
omap boards also). The old style initialization was registering i2c bus 2
(High speed 2.6Mhz)first and bus 1(low speed 400Khz) next but the
commit changed the order in which registration is performed.
Out of my curiosity I just reordered and things started working.


I have attached the boot log also.


>From 5cd28262527a268d0c7ee5f5054fc2c7d8f554fb Mon Sep 17 00:00:00 2001
From: arun <[EMAIL PROTECTED]>
Date: Fri, 6 Jun 2008 18:18:50 +0530
Subject: [PATCH] Fix for the i2c initialization error on 2430sdp


Signed-off-by: arun <[EMAIL PROTECTED]>
---
 arch/arm/mach-omap2/board-2430sdp.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-2430sdp.c
b/arch/arm/mach-omap2/board-2430sdp.c
index e078a2a..97420f7 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -379,8 +379,8 @@ static struct omap_board_config_kernel
sdp2430_config[] __initdata = {

 static int __init omap2430_i2c_init(void)
 {
-   omap_register_i2c_bus(1, 400, NULL, 0);
omap_register_i2c_bus(2, 2600, NULL, 0);
+   omap_register_i2c_bus(1, 400, NULL, 0);
return 0;
 }

-- 
1.5.3.4




Regards,
Arun C


i2c_error_fix_boot_log
Description: Binary data


Re: omap osk and mistral touchscreen-ads7846

2008-05-22 Thread arun c
On Thu, May 22, 2008 at 12:53 PM, mohammed shareef <[EMAIL PROTECTED]> wrote:
> hi arun/all,
>
> when i do cat for interrupts i get:
>
> # cat /proc/interrupts
>   CPU0
>  19:  0 MPU  DMA
>  20:  0 MPU  DMA
>  21:  0 MPU  DMA
>  22:  0 MPU  DMA
>  23:  0 MPU  DMA
>  24:  0 MPU  DMA
>  25:   9834 MPU  LCD DMA
>  31:  3 MPU  lcdc
>  33:  1 MPU  omap-keypad
>  36:313 MPU  i2c_omap
>  46:148 MPU  serial
>  54:  19893 MPU  32KHz timer
>  78:  0 MPU  peripheral wakeup
>  85:  0 MPU  DMA
>  86:  0 MPU  DMA
>  87:  0 MPU  DMA
>  88:  0 MPU  DMA
>  89:  0 MPU  DMA
>  90:  0 MPU  DMA
>  91:  0 MPU  DMA
>  92:  0 MPU  DMA
>  93:  0 MPU  DMA
>  94:  0 MPU  DMA
> 160:   1409GPIO  eth0
> 164: 24GPIO  spi2.0
> 178:  0GPIO  serial wakeup
> 197:  0GPIO  serial wakeup
> 209:  19773GPIO  serial wakeup
> 222:  0GPIO  omap_cf
> 353:  0   MPUIO  tps65010
> 354:  0   MPUIO  mistral_wakeup
> Err:  0
>
> looks like am not getting the touchscreen interrupts.
>
> i havent even calibrated my touchscreen. but i have enabled the SPI
> interface and the ADS7846 touchscreen in the kernel. could you tell me
> how to calibrate it or make it work? i guess i am missing out on some
> files like i have nothing like ts_calibrate in my filesystem.
>
See this link, i think it can help you.
http://linux.omap.com/pipermail/linux-omap-open-source/2005-March/003174.html

Regards,
Arun C
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: omap osk and mistral touchscreen-ads7846

2008-05-21 Thread arun c
On Thu, May 22, 2008 at 4:10 AM, mohammed shareef <[EMAIL PROTECTED]> wrote:
> Hello,
>
> i have enabled the SPI and ADS7846 drivers during kernel (2.6.18)
> compilation. i could see in the kernel boot log that they are also
> initialized.
>
> 
> ads7846 spi2.0: touchscreen + hwmon, irq 164
> input: ADS784x Touchscreen as /class/input/input1
> /
> but could someone tell me what should i do next to calibrate my touchscreen?
>
> i even tried compiling tslib and added the executables to the file
> system. But when i run the executable
> /usr/X11/bin/ts_calibrate
>
> i see no response on the LCD. the system just hangs.'
>
> thanx and regards,
> Shareef
> ___
> Linux-omap-open-source mailing list
> [EMAIL PROTECTED]
> http://linux.omap.com/mailman/listinfo/linux-omap-open-source
>

Hi Shareef,

Touch the screen several times and do a cat /proc/interrupts
to check whether the interrupts are coming.

Or you can enable event device debugging in menuconfig
and see the debug messages.

Regards,
Arun C
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Power management behavior of linux-2.6.14-omap2-v5

2008-05-19 Thread arun c
On Mon, May 19, 2008 at 6:48 PM, Woodruff, Richard <[EMAIL PROTECTED]> wrote:
> You are just talking about your logo disappearing (usually tux)?

No not just tux.

If i run tslib (ts_test) and suspend& resume the
board then also the same behavior is happening.
ie. The normal ts_test screen disappears and
blue screen comes.

Also if i do a cat of some image to /dev/fb0 then
the same image disappears after a
suspend&resume cycle, whether this behavior also
linked to console layer?

Or a higher level mechanism (like X server)
is required to save and restore the framebuffer
after a PM cycle or it's the fb driver's responsibility
to do so?

Regards,
Arun C

>
> It has been this way for years if not forever on all Linux systems.
>
> A long while back in 2.4 this bothered me enough that I did fix it in a MV 
> kernel.  This is in effect of the console layer not saving its logo settings. 
>  It is not all that hard to fix.
>
> For a development system having the logo is kind of a nice thing even an 
> advertising tool.  However, probably no one ships a system with it on.
>
> You might send a patch in to console people to fix it.  When I sent a patch 
> to MV long back it was discarded.  I didn't send it to the proper maintainer 
> which could have stuck then.
>
> Regards,
> Richard W.
>
>> -Original Message-----
>> From: [EMAIL PROTECTED] [mailto:linux-omap-
>> [EMAIL PROTECTED] On Behalf Of arun c
>> Sent: Monday, May 19, 2008 1:49 AM
>> To: linux-omap@vger.kernel.org
>> Subject: Power management behavior of linux-2.6.14-omap2-v5
>>
>> Hi all,
>>
>> I am using linux-2.6.14-omap2-v5 to test PM on 2430SDP.
>>
>> I did
>>
>> a) cat myimg > /dev/fb0
>> I can see "myimg" displayed on the lcd
>>
>> b) cat /dev/fb0 > myimg_before_sleep
>>
>> c) echo "mem" > /sys/power/state
>> Board goes to sleep state.
>>
>> d) After a key press the board awakes and lcd
>>becomes blue "myimg" is disappeared from
>>the screen.
>>
>> e) cat /dev/fb0 > myimg_after_wakeup
>>
>>  The two binary files "myimg_before_sleep" and
>> "myimg_after_wakeup" differs each other.
>>
>> Can somebody explain me why such a behavior?
>> Why the lcd fails to display the same image
>> before and after sleeping?
>>
>> Regards,
>> Arun C
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
>> the body of a message to [EMAIL PROTECTED]
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Power management behavior of linux-2.6.14-omap2-v5

2008-05-18 Thread arun c
Hi all,

I am using linux-2.6.14-omap2-v5 to test PM on 2430SDP.

I did

a) cat myimg > /dev/fb0
I can see "myimg" displayed on the lcd

b) cat /dev/fb0 > myimg_before_sleep

c) echo "mem" > /sys/power/state
Board goes to sleep state.

d) After a key press the board awakes and lcd
   becomes blue "myimg" is disappeared from
   the screen.

e) cat /dev/fb0 > myimg_after_wakeup

 The two binary files "myimg_before_sleep" and
"myimg_after_wakeup" differs each other.

Can somebody explain me why such a behavior?
Why the lcd fails to display the same image
before and after sleeping?

Regards,
Arun C
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] omap3beagle: add driver to turn on the TFP410 framer to get DVI output

2008-05-16 Thread arun c
On Fri, May 16, 2008 at 12:32 PM, arun c <[EMAIL PROTECTED]> wrote:
> Hi Koen,
>
>> diff --git a/drivers/video/omap/lcd_omap3beagle.c 
>> b/drivers/video/omap/lcd_omap3beagle.c
>> new file mode 100644
>> index 000..f5b7466
>> --- /dev/null
>> +++ b/drivers/video/omap/lcd_omap3beagle.c
>> @@ -0,0 +1,135 @@
>> +/*
>> + * LCD panel support for the TI OMAP3 Beagle board
>> + *
>> + * Author: Koen Kooi <[EMAIL PROTECTED]>
>> + *
>> + * Derived from drivers/video/omap/lcd-omap3evm.c
>> + *
>> + * This program 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.
>> + *
>> + * This program 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 program; if not, write to the Free Software Foundation, Inc.,
>> + * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
>> + */
>> +
>> +#include 
>> +#include 
>> +#include 
>> +
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +
>> +#define LCD_PANEL_ENABLE_GPIO   170
>> +
>> +#define LCD_XRES   1024
>> +#define LCD_YRES   768
>
> I don't think there is a need for LCD_PIXCLOCK_MAX
> and LCD_PIXCLOCK_MIN. It should be changed to
> LCD_PIXCLOCK, am I right?

Sorry a small change it should not be LCD_PIXCLOCK ,
only LCD_PIXCLOCK_MAX is enough.

>
>> +#define LCD_PIXCLOCK_MAX64000 /* in kHz */
>> +#define LCD_PIXCLOCK_MIN64000 /* in kHz */
>
>  Regards,
> Arun C
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] omap3beagle: add driver to turn on the TFP410 framer to get DVI output

2008-05-16 Thread arun c
Hi Koen,

> diff --git a/drivers/video/omap/lcd_omap3beagle.c 
> b/drivers/video/omap/lcd_omap3beagle.c
> new file mode 100644
> index 000..f5b7466
> --- /dev/null
> +++ b/drivers/video/omap/lcd_omap3beagle.c
> @@ -0,0 +1,135 @@
> +/*
> + * LCD panel support for the TI OMAP3 Beagle board
> + *
> + * Author: Koen Kooi <[EMAIL PROTECTED]>
> + *
> + * Derived from drivers/video/omap/lcd-omap3evm.c
> + *
> + * This program 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.
> + *
> + * This program 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 program; if not, write to the Free Software Foundation, Inc.,
> + * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
> + */
> +
> +#include 
> +#include 
> +#include 
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#define LCD_PANEL_ENABLE_GPIO   170
> +
> +#define LCD_XRES   1024
> +#define LCD_YRES   768

I don't think there is a need for LCD_PIXCLOCK_MAX
and LCD_PIXCLOCK_MIN. It should be changed to
LCD_PIXCLOCK, am I right?

> +#define LCD_PIXCLOCK_MAX64000 /* in kHz */
> +#define LCD_PIXCLOCK_MIN64000 /* in kHz */

 Regards,
Arun C
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


2430SDP booting problem with the latest git

2008-05-09 Thread arun c
.13.188,
 host=192.168.13.153, domain=, nis-domain=(none),
 bootserver=0.0.0.0, rootserver=192.168.10.135, rootpath=
Looking up port of RPC 13/2 on 192.168.10.135
###

Regards,
Arun C


bootlog
Description: Binary data


[PATCH] OMAP:DISPC Register name typo

2008-05-07 Thread arun c
Hi all,

This patch corrects the register name typo in dispc.c.
False read happens just after the reset(reading DISPC_CONTROL returns
zero), this
might be the reason it worked fine without any issue.


>From 8734c18115caf53121c46002983b6c4763bd7f2b Mon Sep 17 00:00:00 2001
From: arun <[EMAIL PROTECTED]>
Date: Wed, 7 May 2008 12:25:40 +0530
Subject: [PATCH] OMAP:DISPC Register name typo

DISPC_CONTROL was used instead of DISPC_SYSCONFIG.

Signed-off-by: arun <[EMAIL PROTECTED]>
---
 drivers/video/omap/dispc.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c
index 4c055a2..6aff476 100644
--- a/drivers/video/omap/dispc.c
+++ b/drivers/video/omap/dispc.c
@@ -1393,7 +1393,7 @@ static int omap_dispc_init(struct omapfb_device
*fbdev, int ext_mode,
}

/* Enable smart idle and autoidle */
-   l = dispc_read_reg(DISPC_CONTROL);
+   l = dispc_read_reg(DISPC_SYSCONFIG);
l &= ~((3 << 12) | (3 << 3));
l |= (2 << 12) | (2 << 3) | (1 << 0);
dispc_write_reg(DISPC_SYSCONFIG, l);
-- 
1.5.3.4

##

Regards,
Arun C
From 8734c18115caf53121c46002983b6c4763bd7f2b Mon Sep 17 00:00:00 2001
From: arun <[EMAIL PROTECTED]>
Date: Wed, 7 May 2008 12:25:40 +0530
Subject: [PATCH] OMAP:DISPC Register name typo

DISPC_CONTROL was used instead of DISPC_SYSCONFIG.

Signed-off-by: arun <[EMAIL PROTECTED]>
---
 drivers/video/omap/dispc.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c
index 4c055a2..6aff476 100644
--- a/drivers/video/omap/dispc.c
+++ b/drivers/video/omap/dispc.c
@@ -1393,7 +1393,7 @@ static int omap_dispc_init(struct omapfb_device *fbdev, int ext_mode,
 	}
 
 	/* Enable smart idle and autoidle */
-	l = dispc_read_reg(DISPC_CONTROL);
+	l = dispc_read_reg(DISPC_SYSCONFIG);
 	l &= ~((3 << 12) | (3 << 3));
 	l |= (2 << 12) | (2 << 3) | (1 << 0);
 	dispc_write_reg(DISPC_SYSCONFIG, l);
-- 
1.5.3.4



Re: FrameBuffer Boot Option OMAP3 & 2

2008-05-06 Thread arun c
Hi Fabien,

On Tue, May 6, 2008 at 9:37 PM, Royer, Fabien <[EMAIL PROTECTED]> wrote:
> Hello everyone,
>
>
>
>  I am working on the OMAP3 board for displaying video Demos.
>
>
>
>  I am using Mplayer to play some video, but it is using the half of the
>  screen I would like the fullscreen.
>
>
>
>  I try to change in the bootargs omap24xxfb and to put the option
>  rotation 90.
>
>
>
>  So I enter in the U-boot console  # setenv video omap24xxfb:rotation=90
It is video=omap24xxfb:rotation=90
Why a separate variable 'video' ?, instead specify this in bootargs.

One more thing please don't forget to mention the kernel you
are using( I think you are using 2.6.14 kernel and not the latest git)

Regards,
Arun C
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 6/7] OMAP3 EVM: add lcd support

2008-04-29 Thread arun c
On Tue, Apr 29, 2008 at 5:00 AM, Steve Sakoman <[EMAIL PROTECTED]> wrote:
> From: Steve Sakoman <[EMAIL PROTECTED]>
>
>  Add LCD support for OMAP3 EVM
>
>  Signed-off-by: Steve Sakoman <[EMAIL PROTECTED]>
>  ---
>  @@ -0,0 +1,168 @@
>  +/*
>  + * LCD panel support for the TI OMAP3 EVM board
>  + *
>  + * Author: Steve Sakoman <[EMAIL PROTECTED]>
>  + *
>  + * Derived from drivers/video/omap/lcd-apollon.c
>  + *
>  + * This program 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.
>  + *
>  + * This program 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 program; if not, write to the Free Software Foundation, Inc.,
>  + * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
>  + */
>  +
>  +#include 
>  +#include 
>  +#include 
>  +
>  +#include 
>  +#include 
>  +#include 
>  +#include 
>  +
>  +#define LCD_PANEL_ENABLE_GPIO   153
>  +#define LCD_PANEL_LR2
>  +#define LCD_PANEL_UD3
>  +#define LCD_PANEL_INI   152
>  +#define LCD_PANEL_QVGA  154
>  +#define LCD_PANEL_RESB  155
>  +
>  +#define LCD_XRES   480
>  +#define LCD_YRES   640
>  +#define LCD_PIXCLOCK_MAX   41700 /* in pico seconds  */
>  +#define LCD_PIXCLOCK_MIN   38000 /* in pico seconds */
>  +
>  +#define ENABLE_VDAC_DEDICATED  0x03
>  +#define ENABLE_VDAC_DEV_GRP0x20
>  +#define ENABLE_VPLL2_DEDICATED 0x05
>  +#define ENABLE_VPLL2_DEV_GRP   0xE0
>  +

I did not see you calling the below function any ware
in this file, does this definition really required?

>  +extern void omap2_disp_replication_enable (void);

Regards,
Arun C
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] This patch adds VRFB based rotation support to omapfb

2008-04-21 Thread arun c
Hi all,

Sorry forgotten to put message in the last mail,
I have added signed off line to the patch.

##
>From 8d3405d3388bb8daef285ba1adf5f582e27dab91 Mon Sep 17 00:00:00 2001
From: arun <[EMAIL PROTECTED]>
Date: Mon, 21 Apr 2008 14:49:29 +0530
Subject: [PATCH] This patch adds VRFB based rotation support to omapfb

The features are:

a) Processor and applications writes to VRFB0 space and the display
   controller reads from different VRFB space according to degree of
   rotation.

b) Pass video=omapfb:rotate: to see the penguin rotate.

c) Clean up code is not implemented as of now(like unmapping the VRFB regions)

Signed-off-by: arun <[EMAIL PROTECTED]>
---
 drivers/video/omap/dispc.c   |  205 ++
 drivers/video/omap/omapfb_main.c |   23 +++--
 2 files changed, 220 insertions(+), 8 deletions(-)

diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c
index 4c055a2..f7d4acd 100644
--- a/drivers/video/omap/dispc.c
+++ b/drivers/video/omap/dispc.c
@@ -148,6 +148,43 @@
 #define RESMAP_MASK(_page_nr)  \
(1 << ((_page_nr) & (sizeof(unsigned long) * 8 - 1)))

+/* Rotation using VRFB */
+#define ROTATION_TEST  1
+#define SMS_ROT_VIRT_BASE(context, degree) (0x7000 \
+   | 0x400 * (context) \
+   | 0x100 * (degree/90))
+#define VRFB_SIZE  (2048 * 640 * (16/8))
+#define PAGE_WIDTH_EXP 5 /* Assuming SDRAM pagesize= 1024 */
+#define PAGE_HEIGHT_EXP5 /* 1024 = 2^5 * 2^5 */
+#define SMS_IMAGEHEIGHT_OFFSET 16
+#define SMS_IMAGEWIDTH_OFFSET  0
+#define SMS_PH_OFFSET  8
+#define SMS_PW_OFFSET  4
+#define SMS_PS_OFFSET  0
+#define ROT_LINE_LENGTH2048
+
+#define OMAP_SMS_BASE  (0x6C00)
+#define SMS_ROT0_PHYSICAL_BA(context)  __REG32(OMAP_SMS_BASE + 0x188 \
+   + 0x10 * context)
+#define SMS_ROT_CONTROL(context)   __REG32(OMAP_SMS_BASE + 0x180 \
+   + 0x10 * context)
+#define SMS_ROT0_SIZE(context) __REG32(OMAP_SMS_BASE + 0x184 \
+   + 0x10 * context)
+
+dma_addr_t save_paddr;
+unsigned long save_vaddr;
+unsigned long save_offset;
+int vrfb_rotation;
+
+static struct {
+   dma_addr_t  paddr[4];
+   unsigned long   vaddr[4];
+   u32 xoffset;
+   u32 yoffset;
+} vrfb;
+
+static int omap2_disp_set_vrfb(u32 width, u32 height, u32 bytes_per_pixel);
+
 struct resmap {
unsigned long   start;
unsignedpage_cnt;
@@ -449,6 +486,7 @@ static int omap_dispc_setup_plane(int plane, int
channel_out,

if ((unsigned)plane > dispc.mem_desc.region_cnt)
return -EINVAL;
+   save_offset = offset;
paddr = dispc.mem_desc.region[plane].paddr + offset;
enable_lcd_clocks(1);
r = _setup_plane(plane, channel_out, paddr,
@@ -458,6 +496,111 @@ static int omap_dispc_setup_plane(int plane, int
channel_out,
return r;
 }

+static inline u32
+calc_vrfb_div(u32 img_side, u32 page_exp)
+{
+   u32 div;
+   div = img_side / page_exp;
+   if ((div * page_exp) < img_side)
+   return div + 1;
+   else
+   return div;
+}
+
+static int omap2_disp_set_vrfb(u32 width, u32 height, u32 bytes_per_pixel)
+{
+   int page_width_exp, page_height_exp, pixel_size_exp;
+   int context = 0;
+   int div;
+   u32 vrfb_width;
+   u32 vrfb_height;
+
+   page_width_exp = PAGE_WIDTH_EXP;
+   page_height_exp = PAGE_HEIGHT_EXP;
+   pixel_size_exp = bytes_per_pixel >> 1;
+
+   div = calc_vrfb_div(width * bytes_per_pixel, 1 << page_width_exp);
+   vrfb_width = (div * (1 << page_width_exp)) / bytes_per_pixel;
+
+   div = calc_vrfb_div(height, 1 << page_height_exp);
+   vrfb_height = div * (1 << page_height_exp);
+
+   SMS_ROT0_PHYSICAL_BA(context) = save_paddr;
+   SMS_ROT0_SIZE(context) = 0;
+   SMS_ROT0_SIZE(context)  |= (vrfb_width << SMS_IMAGEWIDTH_OFFSET)
+   | (vrfb_height << SMS_IMAGEHEIGHT_OFFSET);
+   SMS_ROT_CONTROL(context) = 0;
+   SMS_ROT_CONTROL(context) |= pixel_size_exp << SMS_PS_OFFSET
+   | page_width_exp  << SMS_PW_OFFSET
+   | page_height_exp << SMS_PH_OFFSET;
+
+   vrfb.xoffset = vrfb_width - width;
+   vrfb.yoffset = vrfb_height - height;
+   return 0;
+}
+
+static int omap_dispc_set_rotate(int angle)
+{
+   const u32 ba_reg[] = { DISPC_GFX_BA0 };
+   const u32 ri_reg[] = { DISPC_GFX_ROW_INC };
+   const u32 pi_reg[] = { DISPC_GFX_PIXEL_INC };
+   int width, height;
+   u32 addr_base;
+   u32 Bpp;
+
+   if (vrfb_rotation != 1)
+   return 0;
+
+   width = dispc.fbd

[PATCH] This patch adds VRFB based rotation support to omapfb

2008-04-21 Thread arun c
>From 8d3405d3388bb8daef285ba1adf5f582e27dab91 Mon Sep 17 00:00:00 2001
From: arun <[EMAIL PROTECTED]>
Date: Mon, 21 Apr 2008 14:49:29 +0530
Subject: [PATCH] This patch adds VRFB based rotation support to omapfb

The features are:

a) Processor and applications writes to VRFB0 space and the display
   controller reads from different VRFB space according to degree of
   rotation.

b) Pass video=omapfb:rotate: to see the penguin rotate.

c) Clean up code is not implemented as of now(like unmapping the VRFB regions)

Signed-off-by: arun <[EMAIL PROTECTED]>
---
 drivers/video/omap/dispc.c   |  205 ++
 drivers/video/omap/omapfb_main.c |   23 +++--
 2 files changed, 220 insertions(+), 8 deletions(-)

diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c
index 4c055a2..f7d4acd 100644
--- a/drivers/video/omap/dispc.c
+++ b/drivers/video/omap/dispc.c
@@ -148,6 +148,43 @@
 #define RESMAP_MASK(_page_nr)  \
(1 << ((_page_nr) & (sizeof(unsigned long) * 8 - 1)))

+/* Rotation using VRFB */
+#define ROTATION_TEST  1
+#define SMS_ROT_VIRT_BASE(context, degree) (0x7000 \
+   | 0x400 * (context) \
+   | 0x100 * (degree/90))
+#define VRFB_SIZE  (2048 * 640 * (16/8))
+#define PAGE_WIDTH_EXP 5 /* Assuming SDRAM pagesize= 1024 */
+#define PAGE_HEIGHT_EXP5 /* 1024 = 2^5 * 2^5 */
+#define SMS_IMAGEHEIGHT_OFFSET 16
+#define SMS_IMAGEWIDTH_OFFSET  0
+#define SMS_PH_OFFSET  8
+#define SMS_PW_OFFSET  4
+#define SMS_PS_OFFSET  0
+#define ROT_LINE_LENGTH2048
+
+#define OMAP_SMS_BASE  (0x6C00)
+#define SMS_ROT0_PHYSICAL_BA(context)  __REG32(OMAP_SMS_BASE + 0x188 \
+   + 0x10 * context)
+#define SMS_ROT_CONTROL(context)   __REG32(OMAP_SMS_BASE + 0x180 \
+   + 0x10 * context)
+#define SMS_ROT0_SIZE(context) __REG32(OMAP_SMS_BASE + 0x184 \
+   + 0x10 * context)
+
+dma_addr_t save_paddr;
+unsigned long save_vaddr;
+unsigned long save_offset;
+int vrfb_rotation;
+
+static struct {
+   dma_addr_t  paddr[4];
+   unsigned long   vaddr[4];
+   u32 xoffset;
+   u32 yoffset;
+} vrfb;
+
+static int omap2_disp_set_vrfb(u32 width, u32 height, u32 bytes_per_pixel);
+
 struct resmap {
unsigned long   start;
unsignedpage_cnt;
@@ -449,6 +486,7 @@ static int omap_dispc_setup_plane(int plane, int
channel_out,

if ((unsigned)plane > dispc.mem_desc.region_cnt)
return -EINVAL;
+   save_offset = offset;
paddr = dispc.mem_desc.region[plane].paddr + offset;
enable_lcd_clocks(1);
r = _setup_plane(plane, channel_out, paddr,
@@ -458,6 +496,111 @@ static int omap_dispc_setup_plane(int plane, int
channel_out,
return r;
 }

+static inline u32
+calc_vrfb_div(u32 img_side, u32 page_exp)
+{
+   u32 div;
+   div = img_side / page_exp;
+   if ((div * page_exp) < img_side)
+   return div + 1;
+   else
+   return div;
+}
+
+static int omap2_disp_set_vrfb(u32 width, u32 height, u32 bytes_per_pixel)
+{
+   int page_width_exp, page_height_exp, pixel_size_exp;
+   int context = 0;
+   int div;
+   u32 vrfb_width;
+   u32 vrfb_height;
+
+   page_width_exp = PAGE_WIDTH_EXP;
+   page_height_exp = PAGE_HEIGHT_EXP;
+   pixel_size_exp = bytes_per_pixel >> 1;
+
+   div = calc_vrfb_div(width * bytes_per_pixel, 1 << page_width_exp);
+   vrfb_width = (div * (1 << page_width_exp)) / bytes_per_pixel;
+
+   div = calc_vrfb_div(height, 1 << page_height_exp);
+   vrfb_height = div * (1 << page_height_exp);
+
+   SMS_ROT0_PHYSICAL_BA(context) = save_paddr;
+   SMS_ROT0_SIZE(context) = 0;
+   SMS_ROT0_SIZE(context)  |= (vrfb_width << SMS_IMAGEWIDTH_OFFSET)
+   | (vrfb_height << SMS_IMAGEHEIGHT_OFFSET);
+   SMS_ROT_CONTROL(context) = 0;
+   SMS_ROT_CONTROL(context) |= pixel_size_exp << SMS_PS_OFFSET
+   | page_width_exp  << SMS_PW_OFFSET
+   | page_height_exp << SMS_PH_OFFSET;
+
+   vrfb.xoffset = vrfb_width - width;
+   vrfb.yoffset = vrfb_height - height;
+   return 0;
+}
+
+static int omap_dispc_set_rotate(int angle)
+{
+   const u32 ba_reg[] = { DISPC_GFX_BA0 };
+   const u32 ri_reg[] = { DISPC_GFX_ROW_INC };
+   const u32 pi_reg[] = { DISPC_GFX_PIXEL_INC };
+   int width, height;
+   u32 addr_base;
+   u32 Bpp;
+
+   if (vrfb_rotation != 1)
+   return 0;
+
+   width = dispc.fbdev->fb_info[0]->var.xres;
+   height = dispc.fbdev->fb_info[0]->var.yres;
+   Bpp = dispc.fbdev->fb_info[0]->var.bits_per_pixel /

[PATCH] This patch adds VRFB based rotation support to omapfb

2008-04-21 Thread arun c
   dispc.mem_desc.region[0].paddr = vrfb.paddr[0];
+   dispc.fbdev->mem_desc.region[0].vaddr =
+   (void *)vrfb.vaddr[0];
+
+   dispc.fbdev->mem_desc.region[0].paddr = vrfb.paddr[0];
+   omap2_disp_set_vrfb(panel->x_res, panel->y_res,
+panel->bpp / 8);
+   }
+
if (!skip_init) {
for (i = 0; i < dispc.mem_desc.region_cnt; i++) {
memset(dispc.mem_desc.region[i].vaddr, 0,
@@ -1503,4 +1707,5 @@ const struct lcd_ctrl omap2_int_ctrl = {
.set_color_key  = omap_dispc_set_color_key,
.get_color_key  = omap_dispc_get_color_key,
.mmap   = omap_dispc_mmap_user,
+   .set_rotate = omap_dispc_set_rotate,
 };
diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c
index 418ed9f..2a9500b 100644
--- a/drivers/video/omap/omapfb_main.c
+++ b/drivers/video/omap/omapfb_main.c
@@ -32,6 +32,8 @@
 #include 

 #define MODULE_NAME"omapfb"
+#defineROTATION_TEST   1
+#defineROT_LINE_LENGTH 2048

 static unsigned intdef_accel;
 static unsigned long   def_vram[OMAPFB_PLANE_NUM];
@@ -422,7 +424,11 @@ static void set_fb_fix(struct fb_info *fbi)
break;
}
fix->accel  = FB_ACCEL_OMAP1610;
+#ifdef ROTATION_TEST
+   fix->line_length= ROT_LINE_LENGTH * bpp / 8;
+#else
fix->line_length= var->xres_virtual * bpp / 8;
+#endif
 }

 static int set_color_mode(struct omapfb_plane_struct *plane,
@@ -495,13 +501,14 @@ static int set_fb_var(struct fb_info *fbi,
if (plane->color_mode == OMAPFB_COLOR_RGB444)
bpp = 16;

+   xres_min = OMAPFB_PLANE_XRES_MIN;
+   xres_max = panel->x_res;
+   yres_min = OMAPFB_PLANE_YRES_MIN;
+   yres_max = panel->y_res;
+
switch (var->rotate) {
case 0:
case 180:
-   xres_min = OMAPFB_PLANE_XRES_MIN;
-   xres_max = panel->x_res;
-   yres_min = OMAPFB_PLANE_YRES_MIN;
-   yres_max = panel->y_res;
if (cpu_is_omap15xx()) {
var->xres = panel->x_res;
var->yres = panel->y_res;
@@ -509,10 +516,6 @@ static int set_fb_var(struct fb_info *fbi,
break;
case 90:
case 270:
-   xres_min = OMAPFB_PLANE_YRES_MIN;
-   xres_max = panel->y_res;
-   yres_min = OMAPFB_PLANE_XRES_MIN;
-   yres_max = panel->x_res;
if (cpu_is_omap15xx()) {
var->xres = panel->y_res;
var->yres = panel->x_res;
@@ -1715,7 +1718,11 @@ static int omapfb_do_probe(struct platform_device *pdev,

pr_info("omapfb: configured for panel %s\n", fbdev->panel->name);

+#ifdef ROTATION_TEST
+   def_vxres = ROT_LINE_LENGTH;
+#else
def_vxres = def_vxres ? : fbdev->panel->x_res;
+#endif
def_vyres = def_vyres ? : fbdev->panel->y_res;

init_state++;
-- 
1.5.3.4



Regards,
Arun c
From 8d3405d3388bb8daef285ba1adf5f582e27dab91 Mon Sep 17 00:00:00 2001
From: arun <[EMAIL PROTECTED]>
Date: Mon, 21 Apr 2008 14:49:29 +0530
Subject: [PATCH] This patch adds VRFB based rotation support to omapfb

The features are:

a) Processor and applications writes to VRFB0 space and the display
   controller reads from different VRFB space according to degree of
   rotation.

b) Pass video=omapfb:rotate: to see the penguin rotate.

c) Clean up code is not implemented as of now(like unmapping the VRFB regions)
---
 drivers/video/omap/dispc.c   |  205 ++
 drivers/video/omap/omapfb_main.c |   23 +++--
 2 files changed, 220 insertions(+), 8 deletions(-)

diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c
index 4c055a2..f7d4acd 100644
--- a/drivers/video/omap/dispc.c
+++ b/drivers/video/omap/dispc.c
@@ -148,6 +148,43 @@
 #define RESMAP_MASK(_page_nr)		\
 	(1 << ((_page_nr) & (sizeof(unsigned long) * 8 - 1)))
 
+/* Rotation using VRFB */
+#define ROTATION_TEST		1
+#define SMS_ROT_VIRT_BASE(context, degree)	(0x7000		\
+		| 0x400 * (context)	\
+		| 0x100 * (degree/90))
+#define VRFB_SIZE		(2048 * 640 * (16/8))
+#define PAGE_WIDTH_EXP		5 /* Assuming SDRAM pagesize= 1024 */
+#define PAGE_HEIGHT_EXP		5 /* 1024 = 2^5 * 2^5 */
+#define SMS_IMAGEHEIGHT_OFFSET	16
+#define SMS_IMAGEWIDTH_OFFSET	0
+#define SMS_PH_OFFSET		8
+#define SMS_PW_OFFSET		4
+#define SMS_PS_OFFSET		0
+#define ROT_LINE_LENGTH		2048
+
+#define OMAP_SMS_BASE		(0x6C00)
+#define SMS_ROT0_PHYSICAL_BA(context)	__REG32(OMAP_SMS_BASE + 0x188 \
+		+ 0x10 * context)
+#define SMS_ROT_CONTROL(context)	__REG32(OMAP_SMS_BASE + 0x1

Re: [PATCH] This patch adds VRFB based rotation support to omapfb

2008-04-20 Thread arun c
On Sat, 2008-04-19 at 17:33 +0300, Felipe Balbi wrote:
On Sat, Apr 19, 2008 at 06:54:42PM +0530, arun c wrote:
> > Hi all,
> >
> > This patch implements VRFB based rotation support to the
> > framebuffer driver (for omap 2430 platform).
> >
> > It is tested in VGA and QVGA resolution in omap2evm board,
> > i was unable to test it on 2430sdp because my SDP is not booting
> > with the latest git kernel.
> >
> > I am really glad to hear your comments about this , please
> > let me know you suggestions i will try to change accordingly.
> >
> > Many thanks to khasim for the help received from him.
>
> A few cosmetics comments below
>
> >
> > ##
> > From e10a7dd4c624b20d50ac715ef867fa28d7068d97 Mon Sep 17 00:00:00 2001
> > From: arun <[EMAIL PROTECTED]>
> > Date: Sat, 19 Apr 2008 18:33:43 +0530
> > Subject: [PATCH] This patch adds VRFB based rotation support to omapfb
> >
> > The features are:
> >
> > a) Processor and applications writes to VRFB0 space and the display
> >controller reads from different VRFB space according to degree of
> >rotation.
> >
> > b) Pass video=omapfb:rotate: to see the penguin rotate.
> >
> > c) Clean up code is not implemented as of now(like unmapping the VRFB 
> > regions)
> > ---
> >  drivers/video/omap/dispc.c   |  210 
> > ++
> >  drivers/video/omap/omapfb_main.c |   23 +++--
> >  2 files changed, 225 insertions(+), 8 deletions(-)
> >
> > diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c
> > index 4c055a2..419472e 100644
> > --- a/drivers/video/omap/dispc.c
> > +++ b/drivers/video/omap/dispc.c
> > @@ -148,6 +148,44 @@
> >  #define RESMAP_MASK(_page_nr)  
> > \
> > (1 << ((_page_nr) & (sizeof(unsigned long) * 8 - 1)))
> >
> > +/* Rotation using VRFB */
> > +#defineROTATION_TEST   1
> > +#define SMS_ROT_VIRT_BASE(context, degree) (0x7000 \
>  ^
>  Whitespace
> > +   | 0x400 * (context) \
> > +   | 0x100 * (degree/90))
> > +#defineVRFB_SIZE   (2048 * 640 * (16/8))
> > +#definePAGE_WIDTH_EXP  5 /* Assuming SDRAM pagesize= 1024 */
> > +#definePAGE_HEIGHT_EXP 5 /* 1024 = 2^5 * 2^5 */
> > +#defineSMS_IMAGEHEIGHT_OFFSET  16
> > +#defineSMS_IMAGEWIDTH_OFFSET   0
> > +#defineSMS_PH_OFFSET   8
> > +#defineSMS_PW_OFFSET   4
> > +#defineSMS_PS_OFFSET   0
> > +#defineROT_LINE_LENGTH 2048
> > +
> > +#defineOMAP_SMS_BASE   (0x6C00)
> > +
> > +#defineSMS_ROT0_PHYSICAL_BA(context)   __REG32(OMAP_SMS_BASE + 0x188 \
> > +   + 0x10 * context)
> > +#defineSMS_ROT_CONTROL(context)__REG32(OMAP_SMS_BASE + 0x180 \
> > +   + 0x10 * context)
> > +#defineSMS_ROT0_SIZE(context)  __REG32(OMAP_SMS_BASE + 0x184 \
> > +   + 0x10 * context)
> > +
> > +dma_addr_t save_paddr;
> > +unsigned long save_vaddr;
> > +unsigned long save_offset;
> > +int vrfb_rotation;
> > +
> > +static struct {
> > +   dma_addr_t  sms_rot_phy[4];
> > +   unsigned long   sms_rot_virt[4];
> > +   u32 xoffset;
> > +   u32 yoffset;
> > +} vrfb;
> > +
> > +static int omap2_disp_set_vrfb(u32 width, u32 height, u32 bytes_per_pixel);
> > +
> >  struct resmap {
> > unsigned long   start;
> > unsignedpage_cnt;
> > @@ -449,6 +487,7 @@ static int omap_dispc_setup_plane(int plane, int
> > channel_out,
> >
>
> Line wrapped
>
> > if ((unsigned)plane > dispc.mem_desc.region_cnt)
> > return -EINVAL;
> > +   save_offset = offset;
> > paddr = dispc.mem_desc.region[plane].paddr + offset;
> > enable_lcd_clocks(1);
> > r = _setup_plane(plane, channel_out, paddr,
> > @@ -458,6 +497,111 @@ static int omap_dispc_setup_plane(int plane, int
> > channel_out,
>
> line wrapped.
>
> > return r;
> >  }
> >
> > +static inline u32
> > +calc_vrfb_div(u32 img_side, u32 page_exp)
> > +{
> > +   u32 div;
> > +

[PATCH] This patch adds VRFB based rotation support to omapfb

2008-04-19 Thread arun c
if ((r = setup_fbmem(req_vram)) < 0)
goto fail3;

+   if (vrfb_rotation == 1) {
+   save_paddr = dispc.mem_desc.region[0].paddr;
+   save_vaddr = (unsigned long)dispc.mem_desc.region[0].vaddr;
+
+   dispc.mem_desc.region[0].vaddr = (void *)vrfb.sms_rot_virt[0];
+   dispc.mem_desc.region[0].paddr = vrfb.sms_rot_phy[0];
+   dispc.fbdev->mem_desc.region[0].vaddr =
+   (void *)vrfb.sms_rot_virt[0];
+
+   dispc.fbdev->mem_desc.region[0].paddr = vrfb.sms_rot_phy[0];
+   omap2_disp_set_vrfb(panel->x_res, panel->y_res,
+panel->bpp / 8);
+   }
+
if (!skip_init) {
for (i = 0; i < dispc.mem_desc.region_cnt; i++) {
memset(dispc.mem_desc.region[i].vaddr, 0,
@@ -1503,4 +1712,5 @@ const struct lcd_ctrl omap2_int_ctrl = {
.set_color_key  = omap_dispc_set_color_key,
.get_color_key  = omap_dispc_get_color_key,
.mmap   = omap_dispc_mmap_user,
+   .set_rotate = omap_dispc_set_rotate,
 };
diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c
index 418ed9f..2a9500b 100644
--- a/drivers/video/omap/omapfb_main.c
+++ b/drivers/video/omap/omapfb_main.c
@@ -32,6 +32,8 @@
 #include 

 #define MODULE_NAME"omapfb"
+#defineROTATION_TEST   1
+#defineROT_LINE_LENGTH 2048

 static unsigned intdef_accel;
 static unsigned long   def_vram[OMAPFB_PLANE_NUM];
@@ -422,7 +424,11 @@ static void set_fb_fix(struct fb_info *fbi)
break;
}
fix->accel  = FB_ACCEL_OMAP1610;
+#ifdef ROTATION_TEST
+   fix->line_length= ROT_LINE_LENGTH * bpp / 8;
+#else
fix->line_length= var->xres_virtual * bpp / 8;
+#endif
 }

 static int set_color_mode(struct omapfb_plane_struct *plane,
@@ -495,13 +501,14 @@ static int set_fb_var(struct fb_info *fbi,
if (plane->color_mode == OMAPFB_COLOR_RGB444)
bpp = 16;

+   xres_min = OMAPFB_PLANE_XRES_MIN;
+   xres_max = panel->x_res;
+   yres_min = OMAPFB_PLANE_YRES_MIN;
+   yres_max = panel->y_res;
+
switch (var->rotate) {
case 0:
case 180:
-   xres_min = OMAPFB_PLANE_XRES_MIN;
-   xres_max = panel->x_res;
-   yres_min = OMAPFB_PLANE_YRES_MIN;
-   yres_max = panel->y_res;
if (cpu_is_omap15xx()) {
var->xres = panel->x_res;
var->yres = panel->y_res;
@@ -509,10 +516,6 @@ static int set_fb_var(struct fb_info *fbi,
break;
case 90:
case 270:
-   xres_min = OMAPFB_PLANE_YRES_MIN;
-   xres_max = panel->y_res;
-   yres_min = OMAPFB_PLANE_XRES_MIN;
-   yres_max = panel->x_res;
if (cpu_is_omap15xx()) {
var->xres = panel->y_res;
var->yres = panel->x_res;
@@ -1715,7 +1718,11 @@ static int omapfb_do_probe(struct platform_device *pdev,

pr_info("omapfb: configured for panel %s\n", fbdev->panel->name);

+#ifdef ROTATION_TEST
+   def_vxres = ROT_LINE_LENGTH;
+#else
def_vxres = def_vxres ? : fbdev->panel->x_res;
+#endif
def_vyres = def_vyres ? : fbdev->panel->y_res;

init_state++;
-- 
1.5.3.4



Regards,
Arun C
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] This patch removes a dead line from omapfb_main.c

2008-03-30 Thread arun c
This patch removes a dead line from omapfb_main.c


Signed-off-by: arun c <[EMAIL PROTECTED]>
---
 drivers/video/omap/omapfb_main.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c
index 139c84c..418ed9f 100644
--- a/drivers/video/omap/omapfb_main.c
+++ b/drivers/video/omap/omapfb_main.c
@@ -559,7 +559,6 @@ static int set_fb_var(struct fb_info *fbi,
var->xoffset = var->xres_virtual - var->xres;
if (var->yres + var->yoffset > var->yres_virtual)
var->yoffset = var->yres_virtual - var->yres;
-   line_size = var->xres * bpp / 8;

if (plane->color_mode == OMAPFB_COLOR_RGB444) {
var->red.offset   = 8; var->red.length   = 4;
-- 
1.5.0.6
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Unnecessary line in omapfb_main.c

2008-03-25 Thread arun c
Hi all,

While grepping through the sources i found one unnecessary line in
omapfb_main.c

The patch is pasted below.

diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c
index f66b81a..07eb3f0 100644
--- a/drivers/video/omap/omapfb_main.c
+++ b/drivers/video/omap/omapfb_main.c
@@ -559,7 +559,6 @@ static int set_fb_var(struct fb_info *fbi,
var->xoffset = var->xres_virtual - var->xres;
if (var->yres + var->yoffset > var->yres_virtual)
var->yoffset = var->yres_virtual - var->yres;
-   line_size = var->xres * bpp / 8;

if (plane->color_mode == OMAPFB_COLOR_RGB444) {
var->red.offset   = 8; var->red.length   = 4;

Regards,
Arun c
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


VRFB based rotation for omapfb

2008-03-25 Thread arun c
Hi all,

I am trying to implement vrfb based rotation for the git omapfb
driver.

It requires change of fb_fix_screeninfo ( Physical address of fb and
such things)
and fb_info (virtual address of buffer) because different rotation
angles require
different physical addresses for VRFB based rotation. Moreover this changes
has to be done dynamically.

In the current implementation it assumes the framebuffer position (address) is
not changed and passes the control to DSS (dispc.c) to rotate the framebuffer.
This will work nicely for controllers (eg blizzard) which changes some register
bits for rotation.

Can anybody suggest me some hints how to implement this dynamic changes??

Currently i am planning to do all vrfb initialization stuff in omap_dispc_init.
But i am getting confused how to manage the changes for fb_fix_screeninfo
dynamically for different angles, even though the ultimate aim is to program
the DMA and SMS.

Regards,
Arun c
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE:omapfb driver support of DSS rotation and mirroring

2008-03-19 Thread arun c
On Fri, Mar 14, 2008 at 5:53 PM, Syed Mohammed, Khasim <[EMAIL PROTECTED]> 
wrote:
> >
>  > I will try porting it to git ( Surely help is needed because i am
>  > new), does any body tried it alredy?
>  >
>  I will be glad to help you on this, just let me know where exactly you want 
> to start with.
>
>  Probably I will put a ppt or pdf out to all.

Could you please share those documents?

Did rotation Based on DMA is implemented in
ti kernel (linux-2.6.14-omap2-v5)?

>From the code i understood that its just changing
display size , row_inc and pix_inc these values are
not according to TRM values for graphics rotation.
Can anybody please explain this?

In linux-2.6.14-omap2-v5 VRFB based rotation is
only activated when we give video=omap24xxfb:
rotation=X in bootargs.

I think we can make this a menuconfig item and
try to port it to git

Regards,
Arun c
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: omapfb driver support of DSS rotation and mirroring

2008-03-19 Thread arun c
On Fri, Mar 14, 2008 at 5:53 PM, Syed Mohammed, Khasim <[EMAIL PROTECTED]> 
wrote:
> >
>  > I will try porting it to git ( Surely help is needed because i am
>  > new), does any body tried it alredy?
>  >
>  I will be glad to help you on this, just let me know where exactly you want 
> to start with.
>
>  Probably I will put a ppt or pdf out to all.
>
>  Regards,
>  Khasim
>
Could you please share those documents?

Did rotation Based on DMA is implemented in
ti kernel (linux-2.6.14-omap2-v5)?

>From the code i understood that its just changing
display size , row_inc and pix_inc these values are
not according to TRM values for graphics rotation.
Can anybody please explain this?

In linux-2.6.14-omap2-v5 VRFB based rotation is
only activated when we give video=omap24xxfb:
rotation=X in bootargs.

I think we can make this a menuconfig item and
try to port it to git

Regards,
Arun c
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: omapfb driver support of DSS rotation and mirroring

2008-03-14 Thread arun c
On Fri, Mar 14, 2008 at 12:07 PM, Syed Mohammed, Khasim <[EMAIL PROTECTED]> 
wrote:
>
>  Hi Arun,
>
>

Thanks khasim for the reply.

>  > I am working on 2430 SDP and using the latest git kernel.
>  >
>  > I tried to rotate the framebuffer by setting the following in the bootargs
>  > video=omapfb:rotate:90
>  > video=omapfb:rotate:180
>  > video=omapfb:rotate:270
>  >
>
>  I think it is video=omapfb:rotate=270
I tried this too but not working. I rotated the console using
fbcon, but this has nothing to do with framebuffer rotation

I had a look at the sources of omapfb_main.c

   if (fbdev->ctrl->set_rotate != NULL)
   if((r = fbdev->ctrl->set_rotate(var->rotate)) < 0)
   return r;

There is no set_rotate defined in dispc.c so the framebuffer is
not rotated at all, am i correct?

>  But I don't see VRFB support for rotation in GIT version of
> FB driver. With DMA based rotation you will end in FIFO
> underflow as it will not be able to meet the bandwidth
> requirement, you can try to port VRFB support to GIT, it
> might look bit complex, I can help you out in understanding
> (if  required).

I will try porting it to git ( Surely help is needed because i am
new), does any body tried it alredy?

Regards,
Arun C
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


omapfb driver support of DSS rotation and mirroring

2008-03-13 Thread arun c
Hi all,

I am working on 2430 SDP and using the latest git kernel.

I tried to rotate the framebuffer by setting the following in the bootargs
video=omapfb:rotate:90
video=omapfb:rotate:180
video=omapfb:rotate:270

But it seemed to fail, the penguin is always appearing at the
top left corner.

Similar way i tried mirroring also, i got the same result.

Any mistakes in my bootargs ?
Can anybody give me the correct bootargs for rotation& mirroring?

Or the framebuffer driver don't support mirrorring and rotation
of graphics pipeline through DSS?

Thanks in advance

Regards,
Arun c
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


VGA and QVGA support for 2.6.14 v4l2 drivers

2008-03-10 Thread arun c
Hi all,

Did ti kernel's (linux-2.6.14-omap2-v5) v4l2 drivers for 2430sdp support all the
features of DSS in VGA and QVGA mode?

In the driver it is setting default size of video = QQVGA, only changing this
parameter is enough for supporting VGA and QVGA sizes?

Rrgards,
Arun C
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: Problem with configuring the LCD in VGA mode

2008-03-10 Thread Arun C
On Mon, 2008-03-10 at 18:13 +0530, Syed Mohammed, Khasim wrote:
> > > The FIFO settings needs to be adjusted as well, the difference between
> > upper and lower threshold can be made equal to burst size. And keep the
> > high threshold to 0xff.
> > >
> > This is matching in my case( burst = 16 X 32 , high= 0xFF ,low =0xC0)
> > 
> 
> Which processor are you using? For 2430 case it can be 0xFF and 0xC0, for 
> 3430 the FIFO size extends to 0x3FF and 0x3C0 (default values).
> 
> What is the make of LCD? Have we used this before on any OMAP boards?
> 
> What is the DDR frequency?
> 
> Regards,
> Khasim
> 

I am using 2430 custom board. 

Yes my lcd works fine in QVGA resolution

DDR is at 110Mhz(L3 clock)

The interesting thing is that  IRQ error messages increases with the
pixel clock ie, only lower pixel clocks( 5Mhz ,6 Mhz etc) are seems to
be stable on my board.



Regards,
Arun c 



---DISCLAIMER--
The information transmitted herewith is confidential and proprietary 
information intended only for use by the individual or entity to which it is 
addressed. If the reader of this message is not the intended recipient, you are 
hereby notified that any review, retransmission, dissemination, distribution, 
copying or other use of, or taking of any action in reliance upon this 
information is strictly prohibited. If you have received this communication in 
error, please contact the sender and delete the material from your computer.


Please do not print this email unless it is absolutely necessary. Spread 
environmental awareness.


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


RE: Problem with configuring the LCD in VGA mode

2008-03-10 Thread Arun C
Hi,

Thanks Syed Khasim for the reply,

> For VGA LCD on 3430SDP we have configured DSS for 
>  left_margin = 79,   /* pixclocks */
>  right_margin= 89,   /* pixclocks */
>  upper_margin= 1,/* line clocks */
>  lower_margin= 0,/* line clocks */
>  hsync_len   = 3,/* pixclocks */
>  vsync_len   = 2,/* line clocks */
>  sync= 1,/* hsync & vsync polarity */
>  acb = 0x28, /* AC-bias pin frequency */
>  ipc = 1,/* Invert pixel clock */
>  onoff   = 1;/* HSYNC/VSYNC Pixel clk Control*/
> 

I tried with the above values and i am still getting irq errors(gfx
underflow).

The timings corresponding to above values are given below

mode "480x640-49"
# D: 20.600 MHz, H: 31.644 kHz, V: 49.213 Hz
geometry 480 640 480 640 16
timings 48543 89 79 0 1 3 2
accel false
rgba 5/11,6/5,5/0,0/0
endmode

DSS1fclk is at 82.5 Mhz and my prcm settings is PRCM 3 ( Clocking rate
(Crystal/DPLL/MPU): 13.0/660/330 MHz).

That means my dss1Iclk is 110Mhz (L3 is also 110Mhz) is this making any
problem??


> > As with these settings my pixel clock is set to 18.3Mhz and LCD comes up
> > with the linux logo.
> > 
> What is the pixel clock required by LCD? Make your FCLK 4 times the pixel 
> clock.
My lcd datasheet says minimum 23 MHz and maximum 26 MHz. But now my
pixel clock is 20Mhz and FCLK is 82.5 (82.5 > 20*4). Is this enough??

> The FIFO settings needs to be adjusted as well, the difference between upper 
> and lower threshold can be made equal to burst size. And keep the high 
> threshold to 0xff.
> 
This is matching in my case( burst = 16 X 32 , high= 0xFF ,low =0xC0) 

> > If i keep DSS1fclk=55Mhz and pixel_clock=5000 it works without any
> > problem but the vfreq( vertical refresh rate) is very too low for
> > decent viewing in VGA mode.
> > 
> 5000? 

Yes in the git kernel this 5000 is multiplied by 1000 for setting pixel
clock.

Regards,
Arun c


---DISCLAIMER--
The information transmitted herewith is confidential and proprietary 
information intended only for use by the individual or entity to which it is 
addressed. If the reader of this message is not the intended recipient, you are 
hereby notified that any review, retransmission, dissemination, distribution, 
copying or other use of, or taking of any action in reliance upon this 
information is strictly prohibited. If you have received this communication in 
error, please contact the sender and delete the material from your computer.


Please do not print this email unless it is absolutely necessary. Spread 
environmental awareness.


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