All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20100428222805.0a1bab5d@wker>

diff --git a/a/1.txt b/N1/1.txt
index c43bd2b..ef86b4e 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -29,7 +29,7 @@ Grant Likely <grant.likely@secretlab.ca> wrote:
 > > Signed-off-by: John Rigby <jrigby@gmail.com>
 > > Signed-off-by: Anatolij Gustschin <agust@denx.de>
 > > Cc: Grant Likely <grant.likely@secretlab.ca>
-> 
+>=20
 > On quick glance this patch seems mostly okay, but this patch should
 > probably be broken up a bit to simplify review and dissociate
 > unrelated changes.  For example, the move of fsl-diu-fb.h is a
@@ -39,38 +39,40 @@ Grant Likely <grant.likely@secretlab.ca> wrote:
 I will split off fsl-diu-fb.h move to separate patch.
 
 ...
-> > diff --git a/arch/powerpc/platforms/512x/mpc5121_generic.c b/arch/powerpc/platforms/512x/mpc5121_generic.c
+> > diff --git a/arch/powerpc/platforms/512x/mpc5121_generic.c b/arch/power=
+pc/platforms/512x/mpc5121_generic.c
 > > index a6c0e3a..3aaa281 100644
 > > --- a/arch/powerpc/platforms/512x/mpc5121_generic.c
 > > +++ b/arch/powerpc/platforms/512x/mpc5121_generic.c
 > > @@ -28,6 +28,7 @@
-> >  */
-> >  static char *board[] __initdata = {
-> >        "prt,prtlvt",
-> > +       "ifm,pdm360ng",
-> 
+> > =C2=A0*/
+> > =C2=A0static char *board[] __initdata =3D {
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0"prt,prtlvt",
+> > + =C2=A0 =C2=A0 =C2=A0 "ifm,pdm360ng",
+>=20
 > You're adding a new board here.  This is completely unrelated.
 
 Yes, it is unrelated. This hunk sneaked in by accident, will drop it.
 
 ...
-> > diff --git a/arch/powerpc/platforms/512x/mpc512x.h b/arch/powerpc/platforms/512x/mpc512x.h
+> > diff --git a/arch/powerpc/platforms/512x/mpc512x.h b/arch/powerpc/platf=
+orms/512x/mpc512x.h
 > > index d72b2c7..1cfe9d5 100644
 > > --- a/arch/powerpc/platforms/512x/mpc512x.h
 > > +++ b/arch/powerpc/platforms/512x/mpc512x.h
 > > @@ -17,4 +17,7 @@ extern int __init mpc5121_clk_init(void);
-> >  void __init mpc512x_declare_of_platform_devices(void);
-> >  extern void mpc512x_restart(char *cmd);
-> >  extern void __init mpc5121_usb_init(void);
+> > =C2=A0void __init mpc512x_declare_of_platform_devices(void);
+> > =C2=A0extern void mpc512x_restart(char *cmd);
+> > =C2=A0extern void __init mpc5121_usb_init(void);
 > > +extern void __init mpc512x_init_diu(void);
 > > +extern void __init mpc512x_setup_diu(void);
-> 
+>=20
 > __init annotations do not belong in header files.
 
 Ok, I will remove them.
 
 > > +extern struct fsl_diu_shared_fb diu_shared_fb;
-> 
+>=20
 > Hmmmm.  I'm not fond of the global data structure.  Especially
 > considering that the struct fsl_diu_shared_fb is defined in
 > mpc512x_shared.c, so nothing outside of that .c file can do anything
@@ -78,54 +80,64 @@ Ok, I will remove them.
 
 This is a remainder from early debugging code, will remove it.
 
-> >  #endif                         /* __MPC512X_H__ */
-> > diff --git a/arch/powerpc/platforms/512x/mpc512x_shared.c b/arch/powerpc/platforms/512x/mpc512x_shared.c
+> > =C2=A0#endif =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 /* __MPC512X_H__ */
+> > diff --git a/arch/powerpc/platforms/512x/mpc512x_shared.c b/arch/powerp=
+c/platforms/512x/mpc512x_shared.c
 > > index fbdf65f..a8c50a6 100644
 > > --- a/arch/powerpc/platforms/512x/mpc512x_shared.c
 > > +++ b/arch/powerpc/platforms/512x/mpc512x_shared.c
 > > @@ -16,7 +16,11 @@
-> >  #include <linux/io.h>
-> >  #include <linux/irq.h>
-> >  #include <linux/of_platform.h>
+> > =C2=A0#include <linux/io.h>
+> > =C2=A0#include <linux/irq.h>
+> > =C2=A0#include <linux/of_platform.h>
 > > +#include <linux/fsl-diu-fb.h>
 > > +#include <linux/bootmem.h>
 > > +#include <sysdev/fsl_soc.h>
 > >
 > > +#include <asm/cacheflush.h>
-> >  #include <asm/machdep.h>
-> >  #include <asm/ipic.h>
-> >  #include <asm/prom.h>
+> > =C2=A0#include <asm/machdep.h>
+> > =C2=A0#include <asm/ipic.h>
+> > =C2=A0#include <asm/prom.h>
 > > @@ -53,6 +57,284 @@ void mpc512x_restart(char *cmd)
-> >                ;
-> >  }
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;
+> > =C2=A0}
 > >
 > > +struct fsl_diu_shared_fb {
-> > +       char            gamma[0x300];   /* 32-bit aligned! */
-> > +       struct diu_ad   ad0;            /* 32-bit aligned! */
-> > +       phys_addr_t     fb_phys;
-> > +       size_t          fb_len;
-> > +       bool            in_use;
+> > + =C2=A0 =C2=A0 =C2=A0 char =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ga=
+mma[0x300]; =C2=A0 /* 32-bit aligned! */
+> > + =C2=A0 =C2=A0 =C2=A0 struct diu_ad =C2=A0 ad0; =C2=A0 =C2=A0 =C2=A0 =
+=C2=A0 =C2=A0 =C2=A0/* 32-bit aligned! */
+> > + =C2=A0 =C2=A0 =C2=A0 phys_addr_t =C2=A0 =C2=A0 fb_phys;
+> > + =C2=A0 =C2=A0 =C2=A0 size_t =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0fb_len;
+> > + =C2=A0 =C2=A0 =C2=A0 bool =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0in=
+_use;
 > > +};
 > > +
 > > +unsigned int mpc512x_get_pixel_format(unsigned int bits_per_pixel,
-> > +                                     int monitor_port)
+> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 int monitor_port)
 > > +{
-> > +       unsigned int pix_fmt;
+> > + =C2=A0 =C2=A0 =C2=A0 unsigned int pix_fmt;
 > > +
-> > +       switch (bits_per_pixel) {
-> > +       case 32:
-> > +               pix_fmt = 0x88883316;
-> > +               break;
-> > +       case 24:
-> > +               pix_fmt = 0x88082219;
-> > +               break;
-> > +       case 16:
-> > +               pix_fmt = 0x65053118;
-> > +               break;
-> > +       default:
-> > +               pix_fmt = 0x00000400;
-> > +       }
-> > +       return pix_fmt;
+> > + =C2=A0 =C2=A0 =C2=A0 switch (bits_per_pixel) {
+> > + =C2=A0 =C2=A0 =C2=A0 case 32:
+> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pix_fmt =3D 0x888833=
+16;
+> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break;
+> > + =C2=A0 =C2=A0 =C2=A0 case 24:
+> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pix_fmt =3D 0x880822=
+19;
+> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break;
+> > + =C2=A0 =C2=A0 =C2=A0 case 16:
+> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pix_fmt =3D 0x650531=
+18;
+> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break;
+> > + =C2=A0 =C2=A0 =C2=A0 default:
+> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pix_fmt =3D 0x000004=
+00;
+> > + =C2=A0 =C2=A0 =C2=A0 }
+> > + =C2=A0 =C2=A0 =C2=A0 return pix_fmt;
 > > +}
 > > +
 > > +void mpc512x_set_gamma_table(int monitor_port, char *gamma_table_base)
@@ -136,34 +148,38 @@ This is a remainder from early debugging code, will remove it.
 > > +{
 > > +}
 > > +
-> > +#define CCM_SCFR1      0x0000000c
-> > +#define DIU_DIV_MASK   0x000000ff
+> > +#define CCM_SCFR1 =C2=A0 =C2=A0 =C2=A00x0000000c
+> > +#define DIU_DIV_MASK =C2=A0 0x000000ff
 > > +void mpc512x_set_pixel_clock(unsigned int pixclock)
 > > +{
-> > +       unsigned long bestval, bestfreq, speed_ccb, busfreq;
-> > +       unsigned long minpixclock, maxpixclock, pixval;
-> > +       struct device_node *np;
-> > +       void __iomem *ccm;
-> > +       u32 temp;
-> > +       long err;
-> > +       int i;
+> > + =C2=A0 =C2=A0 =C2=A0 unsigned long bestval, bestfreq, speed_ccb, busf=
+req;
+> > + =C2=A0 =C2=A0 =C2=A0 unsigned long minpixclock, maxpixclock, pixval;
+> > + =C2=A0 =C2=A0 =C2=A0 struct device_node *np;
+> > + =C2=A0 =C2=A0 =C2=A0 void __iomem *ccm;
+> > + =C2=A0 =C2=A0 =C2=A0 u32 temp;
+> > + =C2=A0 =C2=A0 =C2=A0 long err;
+> > + =C2=A0 =C2=A0 =C2=A0 int i;
 > > +
-> > +       np = of_find_compatible_node(NULL, NULL, "fsl,mpc5121-clock");
-> > +       if (!np) {
-> > +               pr_err("Can't find clock control module.\n");
-> > +               return;
-> > +       }
+> > + =C2=A0 =C2=A0 =C2=A0 np =3D of_find_compatible_node(NULL, NULL, "fsl,=
+mpc5121-clock");
+> > + =C2=A0 =C2=A0 =C2=A0 if (!np) {
+> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pr_err("Can't find c=
+lock control module.\n");
+> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return;
+> > + =C2=A0 =C2=A0 =C2=A0 }
 > > +
-> > +       ccm = of_iomap(np, 0);
-> > +       if (!ccm) {
-> > +               pr_err("Can't map clock control module reg.\n");
-> > +               of_node_put(np);
-> > +               return;
-> > +       }
-> > +       of_node_put(np);
+> > + =C2=A0 =C2=A0 =C2=A0 ccm =3D of_iomap(np, 0);
+> > + =C2=A0 =C2=A0 =C2=A0 if (!ccm) {
+> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pr_err("Can't map cl=
+ock control module reg.\n");
+> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 of_node_put(np);
+> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return;
+> > + =C2=A0 =C2=A0 =C2=A0 }
+> > + =C2=A0 =C2=A0 =C2=A0 of_node_put(np);
 > > +
-> > +       busfreq = 200000000;
-> 
+> > + =C2=A0 =C2=A0 =C2=A0 busfreq =3D 200000000;
+>=20
 > Instead of some hard coding some bogus defalt busfreq, you should
 > error out if the real frequency cannot be determined.  Force users to
 > supply a valid tree.
@@ -172,15 +188,17 @@ Ok, will fix.
 
 ...
 > > +
-> > +       /* Calculate the pixel clock with the smallest error */
-> > +       /* calculate the following in steps to avoid overflow */
-> > +       pr_debug("DIU pixclock in ps - %d\n", pixclock);
-> > +       temp = 1;
-> > +       temp *= 1000000000;
-> > +       temp /= pixclock;
-> > +       temp *= 1000;
-> > +       pixclock = temp;
-> 
+> > + =C2=A0 =C2=A0 =C2=A0 /* Calculate the pixel clock with the smallest e=
+rror */
+> > + =C2=A0 =C2=A0 =C2=A0 /* calculate the following in steps to avoid ove=
+rflow */
+> > + =C2=A0 =C2=A0 =C2=A0 pr_debug("DIU pixclock in ps - %d\n", pixclock);
+> > + =C2=A0 =C2=A0 =C2=A0 temp =3D 1;
+> > + =C2=A0 =C2=A0 =C2=A0 temp *=3D 1000000000;
+> > + =C2=A0 =C2=A0 =C2=A0 temp /=3D pixclock;
+> > + =C2=A0 =C2=A0 =C2=A0 temp *=3D 1000;
+> > + =C2=A0 =C2=A0 =C2=A0 pixclock =3D temp;
+>=20
 > Really?  I think you can simplify this.
 
 Yes, will do it in the next patch.
@@ -191,80 +209,109 @@ Yes, will do it in the next patch.
 > > --- a/drivers/video/fsl-diu-fb.c
 > > +++ b/drivers/video/fsl-diu-fb.c
 > > @@ -34,7 +34,7 @@
-> >  #include <linux/of_platform.h>
+> > =C2=A0#include <linux/of_platform.h>
 > >
-> >  #include <sysdev/fsl_soc.h>
+> > =C2=A0#include <sysdev/fsl_soc.h>
 > > -#include "fsl-diu-fb.h"
 > > +#include <linux/fsl-diu-fb.h>
 > >
-> >  #include "ofmode.h"
+> > =C2=A0#include "ofmode.h"
 > >
-> > @@ -331,8 +331,11 @@ static int fsl_diu_enable_panel(struct fb_info *info)
-> >        if (mfbi->type != MFB_TYPE_OFF) {
-> >                switch (mfbi->index) {
-> >                case 0:                         /* plane 0 */
-> > -                       if (hw->desc[0] != ad->paddr)
-> > +                       if (in_be32(&hw->desc[0]) != ad->paddr) {
-> 
+> > @@ -331,8 +331,11 @@ static int fsl_diu_enable_panel(struct fb_info *in=
+fo)
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0if (mfbi->type !=3D MFB_TYPE_OFF) {
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0switch (mfbi->in=
+dex) {
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case 0: =C2=A0 =
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
+=A0 /* plane 0 */
+> > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
+ =C2=A0 if (hw->desc[0] !=3D ad->paddr)
+> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
+ =C2=A0 if (in_be32(&hw->desc[0]) !=3D ad->paddr) {
+>=20
 > Unrelated bugfix?  If so, please split into separate patch.
-> 
-> 
-> > +                               out_be32(&dr.diu_reg->diu_mode, 0);
-> >                                out_be32(&hw->desc[0], ad->paddr);
-> 
+>=20
+>=20
+> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 out_be32(&dr.diu_reg->diu_mode, 0);
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0out_be32(&hw->desc[0], ad->paddr);
+>=20
 > This line also looks like it needs fixing.
 
 Will re-check it an fix.
 
-> 
-> > +                               out_be32(&dr.diu_reg->diu_mode, 1);
-> > +                       }
-> >                        break;
-> >                case 1:                         /* plane 1 AOI 0 */
-> >                        cmfbi = machine_data->fsl_diu_info[2]->par;
-> > @@ -391,7 +394,7 @@ static int fsl_diu_disable_panel(struct fb_info *info)
+>=20
+> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 out_be32(&dr.diu_reg->diu_mode, 1);
+> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
+ =C2=A0 }
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
+=C2=A0 =C2=A0break;
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case 1: =C2=A0 =
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
+=A0 /* plane 1 AOI 0 */
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
+=C2=A0 =C2=A0cmfbi =3D machine_data->fsl_diu_info[2]->par;
+> > @@ -391,7 +394,7 @@ static int fsl_diu_disable_panel(struct fb_info *in=
+fo)
 > >
-> >        switch (mfbi->index) {
-> >        case 0:                                 /* plane 0 */
-> > -               if (hw->desc[0] != machine_data->dummy_ad->paddr)
-> > +               if (in_be32(&hw->desc[0]) != machine_data->dummy_ad->paddr)
-> 
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0switch (mfbi->index) {
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0case 0: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
+=A0 /* plane 0 */
+> > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (hw->desc[0] !=3D=
+ machine_data->dummy_ad->paddr)
+> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (in_be32(&hw->des=
+c[0]) !=3D machine_data->dummy_ad->paddr)
+>=20
 > Same bugfix?
 
 Will re-check it, too.
 
-> 
-> >                        out_be32(&hw->desc[0],
-> >                                machine_data->dummy_ad->paddr);
-> >                break;
-> > @@ -1102,6 +1105,10 @@ static int fsl_diu_open(struct fb_info *info, int user)
-> >        struct mfb_info *mfbi = info->par;
-> >        int res = 0;
+>=20
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
+=C2=A0 =C2=A0out_be32(&hw->desc[0],
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0machine_data->dummy_ad->paddr);
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
+> > @@ -1102,6 +1105,10 @@ static int fsl_diu_open(struct fb_info *info, in=
+t user)
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0struct mfb_info *mfbi =3D info->par;
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0int res =3D 0;
 > >
-> > +       /* free boot splash memory on first /dev/fb0 open */
-> > +       if (!mfbi->index && diu_ops.release_bootmem)
-> > +               diu_ops.release_bootmem();
+> > + =C2=A0 =C2=A0 =C2=A0 /* free boot splash memory on first /dev/fb0 ope=
+n */
+> > + =C2=A0 =C2=A0 =C2=A0 if (!mfbi->index && diu_ops.release_bootmem)
+> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 diu_ops.release_boot=
+mem();
 > > +
-> >        spin_lock(&diu_lock);
-> >        mfbi->count++;
-> >        if (mfbi->count = 1) {
-> > @@ -1436,6 +1443,7 @@ static int __devinit fsl_diu_probe(struct of_device *ofdev,
-> >        int ret, i, error = 0;
-> >        struct resource res;
-> >        struct fsl_diu_data *machine_data;
-> > +       int diu_mode;
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0spin_lock(&diu_lock);
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0mfbi->count++;
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0if (mfbi->count =3D=3D 1) {
+> > @@ -1436,6 +1443,7 @@ static int __devinit fsl_diu_probe(struct of_devi=
+ce *ofdev,
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0int ret, i, error =3D 0;
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0struct resource res;
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0struct fsl_diu_data *machine_data;
+> > + =C2=A0 =C2=A0 =C2=A0 int diu_mode;
 > >
-> >        machine_data = kzalloc(sizeof(struct fsl_diu_data), GFP_KERNEL);
-> >        if (!machine_data)
-> > @@ -1472,7 +1480,9 @@ static int __devinit fsl_diu_probe(struct of_device *ofdev,
-> >                goto error2;
-> >        }
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0machine_data =3D kzalloc(sizeof(struct fsl_d=
+iu_data), GFP_KERNEL);
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!machine_data)
+> > @@ -1472,7 +1480,9 @@ static int __devinit fsl_diu_probe(struct of_devi=
+ce *ofdev,
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0goto error2;
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0}
 > >
-> > -       out_be32(&dr.diu_reg->diu_mode, 0);             /* disable DIU anyway*/
-> > +       diu_mode = in_be32(&dr.diu_reg->diu_mode);
-> > +       if (diu_mode != MFB_MODE1)
-> > +               out_be32(&dr.diu_reg->diu_mode, 0);     /* disable DIU */
-> 
+> > - =C2=A0 =C2=A0 =C2=A0 out_be32(&dr.diu_reg->diu_mode, 0); =C2=A0 =C2=
+=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* disable DIU anyway*/
+> > + =C2=A0 =C2=A0 =C2=A0 diu_mode =3D in_be32(&dr.diu_reg->diu_mode);
+> > + =C2=A0 =C2=A0 =C2=A0 if (diu_mode !=3D MFB_MODE1)
+> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 out_be32(&dr.diu_reg=
+->diu_mode, 0); =C2=A0 =C2=A0 /* disable DIU */
+>=20
 > Is this the best approach?  Would it be better to make this decision
 > based on a property in the device tree?
 
@@ -274,28 +321,36 @@ using a dummy descriptor. We just prevent this disabling
 if the DIU is pre-initialized and already displaying.
 
 > >
-> >        /* Get the IRQ of the DIU */
-> >        machine_data->irq = irq_of_parse_and_map(np, 0);
-> > @@ -1520,7 +1530,12 @@ static int __devinit fsl_diu_probe(struct of_device *ofdev,
-> >        machine_data->dummy_ad->offset_xyd = 0;
-> >        machine_data->dummy_ad->next_ad = 0;
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0/* Get the IRQ of the DIU */
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0machine_data->irq =3D irq_of_parse_and_map(n=
+p, 0);
+> > @@ -1520,7 +1530,12 @@ static int __devinit fsl_diu_probe(struct of_dev=
+ice *ofdev,
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0machine_data->dummy_ad->offset_xyd =3D 0;
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0machine_data->dummy_ad->next_ad =3D 0;
 > >
-> > -       out_be32(&dr.diu_reg->desc[0], machine_data->dummy_ad->paddr);
-> > +       /* Let DIU display splash screen if it was pre-initialized
-> > +        * by the bootloader, set dummy area descriptor otherwise.
-> > +        */
-> > +       if (diu_mode != MFB_MODE1)
-> > +               out_be32(&dr.diu_reg->desc[0], machine_data->dummy_ad->paddr);
+> > - =C2=A0 =C2=A0 =C2=A0 out_be32(&dr.diu_reg->desc[0], machine_data->dum=
+my_ad->paddr);
+> > + =C2=A0 =C2=A0 =C2=A0 /* Let DIU display splash screen if it was pre-i=
+nitialized
+> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0* by the bootloader, set dummy area descri=
+ptor otherwise.
+> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0*/
+> > + =C2=A0 =C2=A0 =C2=A0 if (diu_mode !=3D MFB_MODE1)
+> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 out_be32(&dr.diu_reg=
+->desc[0], machine_data->dummy_ad->paddr);
 > > +
-> 
+>=20
 > Same as above.
-> 
-> >        out_be32(&dr.diu_reg->desc[1], machine_data->dummy_ad->paddr);
-> >        out_be32(&dr.diu_reg->desc[2], machine_data->dummy_ad->paddr);
+>=20
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0out_be32(&dr.diu_reg->desc[1], machine_data-=
+>dummy_ad->paddr);
+> > =C2=A0 =C2=A0 =C2=A0 =C2=A0out_be32(&dr.diu_reg->desc[2], machine_data-=
+>dummy_ad->paddr);
 > >
-> 
-> 
-> 
+>=20
+>=20
+>=20
 
 Thanks,
 Anatolij
diff --git a/a/content_digest b/N1/content_digest
index 037536d..6f5b7df 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -3,7 +3,7 @@
  "ref\0fa686aa41002272250j64b2d691vb41f73e1eb335c8a@mail.gmail.com\0"
  "From\0Anatolij Gustschin <agust@denx.de>\0"
  "Subject\0Re: [PATCH 3/3] powerpc/mpc5121: shared DIU framebuffer support\0"
- "Date\0Wed, 28 Apr 2010 20:28:05 +0000\0"
+ "Date\0Wed, 28 Apr 2010 22:28:05 +0200\0"
  "To\0Grant Likely <grant.likely@secretlab.ca>\0"
  "Cc\0linuxppc-dev@ozlabs.org"
   linux-fbdev@vger.kernel.org
@@ -43,7 +43,7 @@
  "> > Signed-off-by: John Rigby <jrigby@gmail.com>\n"
  "> > Signed-off-by: Anatolij Gustschin <agust@denx.de>\n"
  "> > Cc: Grant Likely <grant.likely@secretlab.ca>\n"
- "> \n"
+ ">=20\n"
  "> On quick glance this patch seems mostly okay, but this patch should\n"
  "> probably be broken up a bit to simplify review and dissociate\n"
  "> unrelated changes.  For example, the move of fsl-diu-fb.h is a\n"
@@ -53,38 +53,40 @@
  "I will split off fsl-diu-fb.h move to separate patch.\n"
  "\n"
  "...\n"
- "> > diff --git a/arch/powerpc/platforms/512x/mpc5121_generic.c b/arch/powerpc/platforms/512x/mpc5121_generic.c\n"
+ "> > diff --git a/arch/powerpc/platforms/512x/mpc5121_generic.c b/arch/power=\n"
+ "pc/platforms/512x/mpc5121_generic.c\n"
  "> > index a6c0e3a..3aaa281 100644\n"
  "> > --- a/arch/powerpc/platforms/512x/mpc5121_generic.c\n"
  "> > +++ b/arch/powerpc/platforms/512x/mpc5121_generic.c\n"
  "> > @@ -28,6 +28,7 @@\n"
- "> > \302\240*/\n"
- "> > \302\240static char *board[] __initdata = {\n"
- "> > \302\240 \302\240 \302\240 \302\240\"prt,prtlvt\",\n"
- "> > + \302\240 \302\240 \302\240 \"ifm,pdm360ng\",\n"
- "> \n"
+ "> > =C2=A0*/\n"
+ "> > =C2=A0static char *board[] __initdata =3D {\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0\"prt,prtlvt\",\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 \"ifm,pdm360ng\",\n"
+ ">=20\n"
  "> You're adding a new board here.  This is completely unrelated.\n"
  "\n"
  "Yes, it is unrelated. This hunk sneaked in by accident, will drop it.\n"
  "\n"
  "...\n"
- "> > diff --git a/arch/powerpc/platforms/512x/mpc512x.h b/arch/powerpc/platforms/512x/mpc512x.h\n"
+ "> > diff --git a/arch/powerpc/platforms/512x/mpc512x.h b/arch/powerpc/platf=\n"
+ "orms/512x/mpc512x.h\n"
  "> > index d72b2c7..1cfe9d5 100644\n"
  "> > --- a/arch/powerpc/platforms/512x/mpc512x.h\n"
  "> > +++ b/arch/powerpc/platforms/512x/mpc512x.h\n"
  "> > @@ -17,4 +17,7 @@ extern int __init mpc5121_clk_init(void);\n"
- "> > \302\240void __init mpc512x_declare_of_platform_devices(void);\n"
- "> > \302\240extern void mpc512x_restart(char *cmd);\n"
- "> > \302\240extern void __init mpc5121_usb_init(void);\n"
+ "> > =C2=A0void __init mpc512x_declare_of_platform_devices(void);\n"
+ "> > =C2=A0extern void mpc512x_restart(char *cmd);\n"
+ "> > =C2=A0extern void __init mpc5121_usb_init(void);\n"
  "> > +extern void __init mpc512x_init_diu(void);\n"
  "> > +extern void __init mpc512x_setup_diu(void);\n"
- "> \n"
+ ">=20\n"
  "> __init annotations do not belong in header files.\n"
  "\n"
  "Ok, I will remove them.\n"
  "\n"
  "> > +extern struct fsl_diu_shared_fb diu_shared_fb;\n"
- "> \n"
+ ">=20\n"
  "> Hmmmm.  I'm not fond of the global data structure.  Especially\n"
  "> considering that the struct fsl_diu_shared_fb is defined in\n"
  "> mpc512x_shared.c, so nothing outside of that .c file can do anything\n"
@@ -92,54 +94,64 @@
  "\n"
  "This is a remainder from early debugging code, will remove it.\n"
  "\n"
- "> > \302\240#endif \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 /* __MPC512X_H__ */\n"
- "> > diff --git a/arch/powerpc/platforms/512x/mpc512x_shared.c b/arch/powerpc/platforms/512x/mpc512x_shared.c\n"
+ "> > =C2=A0#endif =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =\n"
+ "=C2=A0 =C2=A0 =C2=A0 =C2=A0 /* __MPC512X_H__ */\n"
+ "> > diff --git a/arch/powerpc/platforms/512x/mpc512x_shared.c b/arch/powerp=\n"
+ "c/platforms/512x/mpc512x_shared.c\n"
  "> > index fbdf65f..a8c50a6 100644\n"
  "> > --- a/arch/powerpc/platforms/512x/mpc512x_shared.c\n"
  "> > +++ b/arch/powerpc/platforms/512x/mpc512x_shared.c\n"
  "> > @@ -16,7 +16,11 @@\n"
- "> > \302\240#include <linux/io.h>\n"
- "> > \302\240#include <linux/irq.h>\n"
- "> > \302\240#include <linux/of_platform.h>\n"
+ "> > =C2=A0#include <linux/io.h>\n"
+ "> > =C2=A0#include <linux/irq.h>\n"
+ "> > =C2=A0#include <linux/of_platform.h>\n"
  "> > +#include <linux/fsl-diu-fb.h>\n"
  "> > +#include <linux/bootmem.h>\n"
  "> > +#include <sysdev/fsl_soc.h>\n"
  "> >\n"
  "> > +#include <asm/cacheflush.h>\n"
- "> > \302\240#include <asm/machdep.h>\n"
- "> > \302\240#include <asm/ipic.h>\n"
- "> > \302\240#include <asm/prom.h>\n"
+ "> > =C2=A0#include <asm/machdep.h>\n"
+ "> > =C2=A0#include <asm/ipic.h>\n"
+ "> > =C2=A0#include <asm/prom.h>\n"
  "> > @@ -53,6 +57,284 @@ void mpc512x_restart(char *cmd)\n"
- "> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240;\n"
- "> > \302\240}\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;\n"
+ "> > =C2=A0}\n"
  "> >\n"
  "> > +struct fsl_diu_shared_fb {\n"
- "> > + \302\240 \302\240 \302\240 char \302\240 \302\240 \302\240 \302\240 \302\240 \302\240gamma[0x300]; \302\240 /* 32-bit aligned! */\n"
- "> > + \302\240 \302\240 \302\240 struct diu_ad \302\240 ad0; \302\240 \302\240 \302\240 \302\240 \302\240 \302\240/* 32-bit aligned! */\n"
- "> > + \302\240 \302\240 \302\240 phys_addr_t \302\240 \302\240 fb_phys;\n"
- "> > + \302\240 \302\240 \302\240 size_t \302\240 \302\240 \302\240 \302\240 \302\240fb_len;\n"
- "> > + \302\240 \302\240 \302\240 bool \302\240 \302\240 \302\240 \302\240 \302\240 \302\240in_use;\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 char =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ga=\n"
+ "mma[0x300]; =C2=A0 /* 32-bit aligned! */\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 struct diu_ad =C2=A0 ad0; =C2=A0 =C2=A0 =C2=A0 =\n"
+ "=C2=A0 =C2=A0 =C2=A0/* 32-bit aligned! */\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 phys_addr_t =C2=A0 =C2=A0 fb_phys;\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 size_t =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0fb_len;\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 bool =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0in=\n"
+ "_use;\n"
  "> > +};\n"
  "> > +\n"
  "> > +unsigned int mpc512x_get_pixel_format(unsigned int bits_per_pixel,\n"
- "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 int monitor_port)\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=\n"
+ " =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 int monitor_port)\n"
  "> > +{\n"
- "> > + \302\240 \302\240 \302\240 unsigned int pix_fmt;\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 unsigned int pix_fmt;\n"
  "> > +\n"
- "> > + \302\240 \302\240 \302\240 switch (bits_per_pixel) {\n"
- "> > + \302\240 \302\240 \302\240 case 32:\n"
- "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 pix_fmt = 0x88883316;\n"
- "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 break;\n"
- "> > + \302\240 \302\240 \302\240 case 24:\n"
- "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 pix_fmt = 0x88082219;\n"
- "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 break;\n"
- "> > + \302\240 \302\240 \302\240 case 16:\n"
- "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 pix_fmt = 0x65053118;\n"
- "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 break;\n"
- "> > + \302\240 \302\240 \302\240 default:\n"
- "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 pix_fmt = 0x00000400;\n"
- "> > + \302\240 \302\240 \302\240 }\n"
- "> > + \302\240 \302\240 \302\240 return pix_fmt;\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 switch (bits_per_pixel) {\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 case 32:\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pix_fmt =3D 0x888833=\n"
+ "16;\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break;\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 case 24:\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pix_fmt =3D 0x880822=\n"
+ "19;\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break;\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 case 16:\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pix_fmt =3D 0x650531=\n"
+ "18;\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break;\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 default:\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pix_fmt =3D 0x000004=\n"
+ "00;\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 }\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 return pix_fmt;\n"
  "> > +}\n"
  "> > +\n"
  "> > +void mpc512x_set_gamma_table(int monitor_port, char *gamma_table_base)\n"
@@ -150,34 +162,38 @@
  "> > +{\n"
  "> > +}\n"
  "> > +\n"
- "> > +#define CCM_SCFR1 \302\240 \302\240 \302\2400x0000000c\n"
- "> > +#define DIU_DIV_MASK \302\240 0x000000ff\n"
+ "> > +#define CCM_SCFR1 =C2=A0 =C2=A0 =C2=A00x0000000c\n"
+ "> > +#define DIU_DIV_MASK =C2=A0 0x000000ff\n"
  "> > +void mpc512x_set_pixel_clock(unsigned int pixclock)\n"
  "> > +{\n"
- "> > + \302\240 \302\240 \302\240 unsigned long bestval, bestfreq, speed_ccb, busfreq;\n"
- "> > + \302\240 \302\240 \302\240 unsigned long minpixclock, maxpixclock, pixval;\n"
- "> > + \302\240 \302\240 \302\240 struct device_node *np;\n"
- "> > + \302\240 \302\240 \302\240 void __iomem *ccm;\n"
- "> > + \302\240 \302\240 \302\240 u32 temp;\n"
- "> > + \302\240 \302\240 \302\240 long err;\n"
- "> > + \302\240 \302\240 \302\240 int i;\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 unsigned long bestval, bestfreq, speed_ccb, busf=\n"
+ "req;\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 unsigned long minpixclock, maxpixclock, pixval;\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 struct device_node *np;\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 void __iomem *ccm;\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 u32 temp;\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 long err;\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 int i;\n"
  "> > +\n"
- "> > + \302\240 \302\240 \302\240 np = of_find_compatible_node(NULL, NULL, \"fsl,mpc5121-clock\");\n"
- "> > + \302\240 \302\240 \302\240 if (!np) {\n"
- "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 pr_err(\"Can't find clock control module.\\n\");\n"
- "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 return;\n"
- "> > + \302\240 \302\240 \302\240 }\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 np =3D of_find_compatible_node(NULL, NULL, \"fsl,=\n"
+ "mpc5121-clock\");\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 if (!np) {\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pr_err(\"Can't find c=\n"
+ "lock control module.\\n\");\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return;\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 }\n"
  "> > +\n"
- "> > + \302\240 \302\240 \302\240 ccm = of_iomap(np, 0);\n"
- "> > + \302\240 \302\240 \302\240 if (!ccm) {\n"
- "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 pr_err(\"Can't map clock control module reg.\\n\");\n"
- "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 of_node_put(np);\n"
- "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 return;\n"
- "> > + \302\240 \302\240 \302\240 }\n"
- "> > + \302\240 \302\240 \302\240 of_node_put(np);\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 ccm =3D of_iomap(np, 0);\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 if (!ccm) {\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pr_err(\"Can't map cl=\n"
+ "ock control module reg.\\n\");\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 of_node_put(np);\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return;\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 }\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 of_node_put(np);\n"
  "> > +\n"
- "> > + \302\240 \302\240 \302\240 busfreq = 200000000;\n"
- "> \n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 busfreq =3D 200000000;\n"
+ ">=20\n"
  "> Instead of some hard coding some bogus defalt busfreq, you should\n"
  "> error out if the real frequency cannot be determined.  Force users to\n"
  "> supply a valid tree.\n"
@@ -186,15 +202,17 @@
  "\n"
  "...\n"
  "> > +\n"
- "> > + \302\240 \302\240 \302\240 /* Calculate the pixel clock with the smallest error */\n"
- "> > + \302\240 \302\240 \302\240 /* calculate the following in steps to avoid overflow */\n"
- "> > + \302\240 \302\240 \302\240 pr_debug(\"DIU pixclock in ps - %d\\n\", pixclock);\n"
- "> > + \302\240 \302\240 \302\240 temp = 1;\n"
- "> > + \302\240 \302\240 \302\240 temp *= 1000000000;\n"
- "> > + \302\240 \302\240 \302\240 temp /= pixclock;\n"
- "> > + \302\240 \302\240 \302\240 temp *= 1000;\n"
- "> > + \302\240 \302\240 \302\240 pixclock = temp;\n"
- "> \n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 /* Calculate the pixel clock with the smallest e=\n"
+ "rror */\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 /* calculate the following in steps to avoid ove=\n"
+ "rflow */\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 pr_debug(\"DIU pixclock in ps - %d\\n\", pixclock);\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 temp =3D 1;\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 temp *=3D 1000000000;\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 temp /=3D pixclock;\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 temp *=3D 1000;\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 pixclock =3D temp;\n"
+ ">=20\n"
  "> Really?  I think you can simplify this.\n"
  "\n"
  "Yes, will do it in the next patch.\n"
@@ -205,80 +223,109 @@
  "> > --- a/drivers/video/fsl-diu-fb.c\n"
  "> > +++ b/drivers/video/fsl-diu-fb.c\n"
  "> > @@ -34,7 +34,7 @@\n"
- "> > \302\240#include <linux/of_platform.h>\n"
+ "> > =C2=A0#include <linux/of_platform.h>\n"
  "> >\n"
- "> > \302\240#include <sysdev/fsl_soc.h>\n"
+ "> > =C2=A0#include <sysdev/fsl_soc.h>\n"
  "> > -#include \"fsl-diu-fb.h\"\n"
  "> > +#include <linux/fsl-diu-fb.h>\n"
  "> >\n"
- "> > \302\240#include \"ofmode.h\"\n"
+ "> > =C2=A0#include \"ofmode.h\"\n"
  "> >\n"
- "> > @@ -331,8 +331,11 @@ static int fsl_diu_enable_panel(struct fb_info *info)\n"
- "> > \302\240 \302\240 \302\240 \302\240if (mfbi->type != MFB_TYPE_OFF) {\n"
- "> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240switch (mfbi->index) {\n"
- "> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240case 0: \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 /* plane 0 */\n"
- "> > - \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 if (hw->desc[0] != ad->paddr)\n"
- "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 if (in_be32(&hw->desc[0]) != ad->paddr) {\n"
- "> \n"
+ "> > @@ -331,8 +331,11 @@ static int fsl_diu_enable_panel(struct fb_info *in=\n"
+ "fo)\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0if (mfbi->type !=3D MFB_TYPE_OFF) {\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0switch (mfbi->in=\n"
+ "dex) {\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case 0: =C2=A0 =\n"
+ "=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=\n"
+ "=A0 /* plane 0 */\n"
+ "> > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=\n"
+ " =C2=A0 if (hw->desc[0] !=3D ad->paddr)\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=\n"
+ " =C2=A0 if (in_be32(&hw->desc[0]) !=3D ad->paddr) {\n"
+ ">=20\n"
  "> Unrelated bugfix?  If so, please split into separate patch.\n"
- "> \n"
- "> \n"
- "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 out_be32(&dr.diu_reg->diu_mode, 0);\n"
- "> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240out_be32(&hw->desc[0], ad->paddr);\n"
- "> \n"
+ ">=20\n"
+ ">=20\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=\n"
+ " =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 out_be32(&dr.diu_reg->diu_mode, 0);\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =\n"
+ "=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0out_be32(&hw->desc[0], ad->paddr);\n"
+ ">=20\n"
  "> This line also looks like it needs fixing.\n"
  "\n"
  "Will re-check it an fix.\n"
  "\n"
- "> \n"
- "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 out_be32(&dr.diu_reg->diu_mode, 1);\n"
- "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 }\n"
- "> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240break;\n"
- "> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240case 1: \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 /* plane 1 AOI 0 */\n"
- "> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240cmfbi = machine_data->fsl_diu_info[2]->par;\n"
- "> > @@ -391,7 +394,7 @@ static int fsl_diu_disable_panel(struct fb_info *info)\n"
+ ">=20\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=\n"
+ " =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 out_be32(&dr.diu_reg->diu_mode, 1);\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=\n"
+ " =C2=A0 }\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =\n"
+ "=C2=A0 =C2=A0break;\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case 1: =C2=A0 =\n"
+ "=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=\n"
+ "=A0 /* plane 1 AOI 0 */\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =\n"
+ "=C2=A0 =C2=A0cmfbi =3D machine_data->fsl_diu_info[2]->par;\n"
+ "> > @@ -391,7 +394,7 @@ static int fsl_diu_disable_panel(struct fb_info *in=\n"
+ "fo)\n"
  "> >\n"
- "> > \302\240 \302\240 \302\240 \302\240switch (mfbi->index) {\n"
- "> > \302\240 \302\240 \302\240 \302\240case 0: \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 /* plane 0 */\n"
- "> > - \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 if (hw->desc[0] != machine_data->dummy_ad->paddr)\n"
- "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 if (in_be32(&hw->desc[0]) != machine_data->dummy_ad->paddr)\n"
- "> \n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0switch (mfbi->index) {\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0case 0: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =\n"
+ "=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=\n"
+ "=A0 /* plane 0 */\n"
+ "> > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (hw->desc[0] !=3D=\n"
+ " machine_data->dummy_ad->paddr)\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (in_be32(&hw->des=\n"
+ "c[0]) !=3D machine_data->dummy_ad->paddr)\n"
+ ">=20\n"
  "> Same bugfix?\n"
  "\n"
  "Will re-check it, too.\n"
  "\n"
- "> \n"
- "> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240out_be32(&hw->desc[0],\n"
- "> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240machine_data->dummy_ad->paddr);\n"
- "> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240break;\n"
- "> > @@ -1102,6 +1105,10 @@ static int fsl_diu_open(struct fb_info *info, int user)\n"
- "> > \302\240 \302\240 \302\240 \302\240struct mfb_info *mfbi = info->par;\n"
- "> > \302\240 \302\240 \302\240 \302\240int res = 0;\n"
+ ">=20\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =\n"
+ "=C2=A0 =C2=A0out_be32(&hw->desc[0],\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =\n"
+ "=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0machine_data->dummy_ad->paddr);\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;\n"
+ "> > @@ -1102,6 +1105,10 @@ static int fsl_diu_open(struct fb_info *info, in=\n"
+ "t user)\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0struct mfb_info *mfbi =3D info->par;\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0int res =3D 0;\n"
  "> >\n"
- "> > + \302\240 \302\240 \302\240 /* free boot splash memory on first /dev/fb0 open */\n"
- "> > + \302\240 \302\240 \302\240 if (!mfbi->index && diu_ops.release_bootmem)\n"
- "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 diu_ops.release_bootmem();\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 /* free boot splash memory on first /dev/fb0 ope=\n"
+ "n */\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 if (!mfbi->index && diu_ops.release_bootmem)\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 diu_ops.release_boot=\n"
+ "mem();\n"
  "> > +\n"
- "> > \302\240 \302\240 \302\240 \302\240spin_lock(&diu_lock);\n"
- "> > \302\240 \302\240 \302\240 \302\240mfbi->count++;\n"
- "> > \302\240 \302\240 \302\240 \302\240if (mfbi->count = 1) {\n"
- "> > @@ -1436,6 +1443,7 @@ static int __devinit fsl_diu_probe(struct of_device *ofdev,\n"
- "> > \302\240 \302\240 \302\240 \302\240int ret, i, error = 0;\n"
- "> > \302\240 \302\240 \302\240 \302\240struct resource res;\n"
- "> > \302\240 \302\240 \302\240 \302\240struct fsl_diu_data *machine_data;\n"
- "> > + \302\240 \302\240 \302\240 int diu_mode;\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0spin_lock(&diu_lock);\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0mfbi->count++;\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0if (mfbi->count =3D=3D 1) {\n"
+ "> > @@ -1436,6 +1443,7 @@ static int __devinit fsl_diu_probe(struct of_devi=\n"
+ "ce *ofdev,\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0int ret, i, error =3D 0;\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0struct resource res;\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0struct fsl_diu_data *machine_data;\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 int diu_mode;\n"
  "> >\n"
- "> > \302\240 \302\240 \302\240 \302\240machine_data = kzalloc(sizeof(struct fsl_diu_data), GFP_KERNEL);\n"
- "> > \302\240 \302\240 \302\240 \302\240if (!machine_data)\n"
- "> > @@ -1472,7 +1480,9 @@ static int __devinit fsl_diu_probe(struct of_device *ofdev,\n"
- "> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240goto error2;\n"
- "> > \302\240 \302\240 \302\240 \302\240}\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0machine_data =3D kzalloc(sizeof(struct fsl_d=\n"
+ "iu_data), GFP_KERNEL);\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!machine_data)\n"
+ "> > @@ -1472,7 +1480,9 @@ static int __devinit fsl_diu_probe(struct of_devi=\n"
+ "ce *ofdev,\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0goto error2;\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0}\n"
  "> >\n"
- "> > - \302\240 \302\240 \302\240 out_be32(&dr.diu_reg->diu_mode, 0); \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 /* disable DIU anyway*/\n"
- "> > + \302\240 \302\240 \302\240 diu_mode = in_be32(&dr.diu_reg->diu_mode);\n"
- "> > + \302\240 \302\240 \302\240 if (diu_mode != MFB_MODE1)\n"
- "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 out_be32(&dr.diu_reg->diu_mode, 0); \302\240 \302\240 /* disable DIU */\n"
- "> \n"
+ "> > - =C2=A0 =C2=A0 =C2=A0 out_be32(&dr.diu_reg->diu_mode, 0); =C2=A0 =C2=\n"
+ "=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* disable DIU anyway*/\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 diu_mode =3D in_be32(&dr.diu_reg->diu_mode);\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 if (diu_mode !=3D MFB_MODE1)\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 out_be32(&dr.diu_reg=\n"
+ "->diu_mode, 0); =C2=A0 =C2=A0 /* disable DIU */\n"
+ ">=20\n"
  "> Is this the best approach?  Would it be better to make this decision\n"
  "> based on a property in the device tree?\n"
  "\n"
@@ -288,30 +335,38 @@
  "if the DIU is pre-initialized and already displaying.\n"
  "\n"
  "> >\n"
- "> > \302\240 \302\240 \302\240 \302\240/* Get the IRQ of the DIU */\n"
- "> > \302\240 \302\240 \302\240 \302\240machine_data->irq = irq_of_parse_and_map(np, 0);\n"
- "> > @@ -1520,7 +1530,12 @@ static int __devinit fsl_diu_probe(struct of_device *ofdev,\n"
- "> > \302\240 \302\240 \302\240 \302\240machine_data->dummy_ad->offset_xyd = 0;\n"
- "> > \302\240 \302\240 \302\240 \302\240machine_data->dummy_ad->next_ad = 0;\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0/* Get the IRQ of the DIU */\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0machine_data->irq =3D irq_of_parse_and_map(n=\n"
+ "p, 0);\n"
+ "> > @@ -1520,7 +1530,12 @@ static int __devinit fsl_diu_probe(struct of_dev=\n"
+ "ice *ofdev,\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0machine_data->dummy_ad->offset_xyd =3D 0;\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0machine_data->dummy_ad->next_ad =3D 0;\n"
  "> >\n"
- "> > - \302\240 \302\240 \302\240 out_be32(&dr.diu_reg->desc[0], machine_data->dummy_ad->paddr);\n"
- "> > + \302\240 \302\240 \302\240 /* Let DIU display splash screen if it was pre-initialized\n"
- "> > + \302\240 \302\240 \302\240 \302\240* by the bootloader, set dummy area descriptor otherwise.\n"
- "> > + \302\240 \302\240 \302\240 \302\240*/\n"
- "> > + \302\240 \302\240 \302\240 if (diu_mode != MFB_MODE1)\n"
- "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 out_be32(&dr.diu_reg->desc[0], machine_data->dummy_ad->paddr);\n"
+ "> > - =C2=A0 =C2=A0 =C2=A0 out_be32(&dr.diu_reg->desc[0], machine_data->dum=\n"
+ "my_ad->paddr);\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 /* Let DIU display splash screen if it was pre-i=\n"
+ "nitialized\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0* by the bootloader, set dummy area descri=\n"
+ "ptor otherwise.\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0*/\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 if (diu_mode !=3D MFB_MODE1)\n"
+ "> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 out_be32(&dr.diu_reg=\n"
+ "->desc[0], machine_data->dummy_ad->paddr);\n"
  "> > +\n"
- "> \n"
+ ">=20\n"
  "> Same as above.\n"
- "> \n"
- "> > \302\240 \302\240 \302\240 \302\240out_be32(&dr.diu_reg->desc[1], machine_data->dummy_ad->paddr);\n"
- "> > \302\240 \302\240 \302\240 \302\240out_be32(&dr.diu_reg->desc[2], machine_data->dummy_ad->paddr);\n"
+ ">=20\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0out_be32(&dr.diu_reg->desc[1], machine_data-=\n"
+ ">dummy_ad->paddr);\n"
+ "> > =C2=A0 =C2=A0 =C2=A0 =C2=A0out_be32(&dr.diu_reg->desc[2], machine_data-=\n"
+ ">dummy_ad->paddr);\n"
  "> >\n"
- "> \n"
- "> \n"
- "> \n"
+ ">=20\n"
+ ">=20\n"
+ ">=20\n"
  "\n"
  "Thanks,\n"
  Anatolij
 
-2d91d00f861a4f82aafcbe4ad4c7bb18478c4814332cd86972ac4ba326b3771e
+f8a5833b5b0ac1674a7683033df897cde6aae8ffc55a3a68d0728c0e0391b5d0

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.