All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: Wolfgang Grandegger <wg@grandegger.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 6/6] [POWERPC] booting-without-of: add FHCI USB, FSL MCU, FSL UPM and GPIO LEDs bindings
Date: Wed, 30 Apr 2008 18:07:42 +0400	[thread overview]
Message-ID: <20080430140742.GA789@polina.dev.rtsoft.ru> (raw)
In-Reply-To: <481871E9.5000101@grandegger.com>

On Wed, Apr 30, 2008 at 03:19:37PM +0200, Wolfgang Grandegger wrote:
> Anton Vorontsov wrote:
> > On Wed, Apr 30, 2008 at 10:36:54AM +0200, Wolfgang Grandegger wrote:
> >> Hi Anton,
> > [...]
> >>> +	upm@1,0 {
> >>> +		#address-cells = <0>;
> >>> +		#size-cells = <0>;
> >>> +		compatible = "fsl,upm-nand";
> >>> +		reg = <1 0 1>;
> >>> +		fsl,upm-addr-offset = <16>;
> >>> +		fsl,upm-cmd-offset = <8>;
> >>> +		gpios = <&qe_pio_e 18 0>;
> >>> +
> >>> +		flash {
> >>> +			#address-cells = <1>;
> >>> +			#size-cells = <1>;
> >>> +			compatible = "stmicro,NAND512W3A2BN6E";
> >>> +
> >>> +			partition@0 {
> >>> +				...
> >>> +			};
> >>> +		};
> >>> +	};
> >> Where can I find the code for that binding? fsl_upm_nand.c from
> >> http://patchwork.ozlabs.org/linuxppc/patch?q=upm&id=17306 does not parse
> >> OF partitions. Are there any plans to push the fsl_upm_nand driver
> >> upstream?
> > 
> > David already pushed UPM NAND driver upstream, but true, it was an "old"
> > version, i.e. without approved bindings. I'll send the update (inlining
> > here) if/when these bindings will be applied to the powerpc tree.
> 
> OK, thanks a lot.
> 
> > - - - -
> > From: Anton Vorontsov <avorontsov@ru.mvista.com>
> > Subject: [NAND] update FSL UPM NAND driver for the new OF bindings
> > 
> > - get rid of fsl,wait-pattern and fsl,wait-write. I think this isn't
> >   chip-specific, and we should always do waits. I saw one board that
> >   didn't need fsl,wait-pattern, but I assume it was exception that
> >   proves general rule;
> > - get rid of chip-delay. Today there are no users for this, and if
> >   anyone really need this they should push the OF bindings beforehand;
> > - Now flash chips should be child nodes of the FSL UPM nand controller;
> > - Implement OF partition parsing.
> 
> On what hardware did you test the NAND-UPM driver? Unfortunately, the
> TQM8548 does not support the R/B pin and therefore GPIO support is not
> needed but a chip delay. Furthermore some "asm sync" are required when
> executing the run pattern:

Too bad you need this. Oh well, you need to discuss property name with
the OF guys, or think out some other way to deliver the chip delay
value.

>   static inline int fsl_upm_run_pattern(struct fsl_upm *upm,
>                                         void __iomem *io_base, u32 mar)
>   {
>         int ret = 0, i;
>         unsigned long flags;
> 
>         spin_lock_irqsave(&fsl_lbc_lock, flags);
> 
>         out_be32(&fsl_lbc_regs->mar, mar << (32 - upm->width));
> 
>         asm("sync; isync; msync");
> 
>         switch (upm->width) {
>         case 8:
>                 out_8(io_base, 0x0);
>                 break;
>         case 16:
>                 out_be16(io_base, 0x0);
>                 break;
>         case 32:
>                 out_be32(io_base, 0x0);
>                 break;
>         default:
>                 ret = -EINVAL;
>                 break;
>         }
> 
>         asm("sync; isync; msync");
> 
>         spin_unlock_irqrestore(&fsl_lbc_lock, flags);
> 
>         return ret;
>   }
> 
> 
> Is this a known problem with the MPC85xx? How do we handle it?

I did test this driver on MPC8555 and MPC8360 UPMs. They didn't need
these syncs.. quite suspicious syncs, I must say. Maybe you should
check TLB setup, for the UPM NAND it should be non-cacheable and
guarded, IIRC.

-- 
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2

  reply	other threads:[~2008-04-30 14:07 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-29 18:59 [PATCH 0/6 v4] Few more patches for Kumar's powerpc.git Anton Vorontsov
2008-04-29 19:00 ` [PATCH 1/6] [POWERPC] sysdev: implement FSL GTM support Anton Vorontsov
2008-05-01  4:00   ` Kumar Gala
2008-05-01 11:43     ` Anton Vorontsov
2008-04-29 19:00 ` [PATCH 2/6] [POWERPC] QE: add support for QE USB clocks routing Anton Vorontsov
2008-04-29 19:57   ` Timur Tabi
2008-04-29 21:22     ` Anton Vorontsov
2008-04-29 19:00 ` [PATCH 3/6] [POWERPC] QE: prepare QE PIO code for GPIO LIB support Anton Vorontsov
2008-04-29 20:10   ` Timur Tabi
2008-04-29 19:00 ` [PATCH 4/6] [POWERPC] QE: implement support for the GPIO LIB API Anton Vorontsov
2008-04-29 20:29   ` Timur Tabi
2008-04-29 21:23     ` Anton Vorontsov
2008-04-29 21:29       ` Timur Tabi
2008-04-30 19:30   ` [PATCH v2 " Anton Vorontsov
2008-04-30 19:42     ` Timur Tabi
2008-04-30 22:47       ` Anton Vorontsov
2008-04-30 22:50         ` Timur Tabi
2008-04-30 22:59           ` Anton Vorontsov
2008-04-30 23:03             ` Timur Tabi
2008-04-30 23:24               ` Anton Vorontsov
2008-05-01 14:33                 ` Timur Tabi
2008-05-01 14:33     ` Timur Tabi
2008-04-29 19:00 ` [PATCH 5/6] [POWERPC] 83xx: new board support: MPC8360E-RDK Anton Vorontsov
2008-06-10 15:55   ` Kumar Gala
2008-06-10 19:32     ` [PATCH] powerpc: 83xx: update mpc83xx_defconfig to support MPC8360E-RDK Anton Vorontsov
2008-06-10 22:01       ` Kumar Gala
2008-06-10 23:16         ` [PATCH v2] powerpc/83xx: " Anton Vorontsov
2008-06-11 12:47           ` [PATCH v3] " Anton Vorontsov
2008-04-29 19:00 ` [PATCH 6/6] [POWERPC] booting-without-of: add FHCI USB, FSL MCU, FSL UPM and GPIO LEDs bindings Anton Vorontsov
2008-04-30  8:36   ` Wolfgang Grandegger
2008-04-30 11:16     ` Anton Vorontsov
2008-04-30 13:19       ` Wolfgang Grandegger
2008-04-30 14:07         ` Anton Vorontsov [this message]
2008-04-30 17:26           ` Wolfgang Grandegger
  -- strict thread matches above, loose matches on Subject: below --
2008-04-25 17:00 [PATCH 0/6 v3] Few more patches for Kumar's powerpc.git Anton Vorontsov
2008-04-25 17:01 ` [PATCH 6/6] [POWERPC] booting-without-of: add FHCI USB, FSL MCU, FSL UPM and GPIO LEDs bindings Anton Vorontsov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080430140742.GA789@polina.dev.rtsoft.ru \
    --to=avorontsov@ru.mvista.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=wg@grandegger.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.