[PATCH 8/8] Add support for Xilinx ML403 reference design

2006-01-03 Thread Paula Saameño
Hi Grant,

I?ll try the patches today and I let you know how is going.

See you!

On 1/3/06, Grant Likely  wrote:
>
> Paula Saame?o wrote:
> > I am working with ML403 as well. Right now, I am using a 2.4.26 kernel,
> > but I would be interested in a 2.6 one, it would be great!!
> >
> > Happy 2006!!
> > Paula Saameno
>
> Thanks Paula.
>
> Can you try the posted patches on your ML403?  It should compile and
> boot with no problems with the reference design.  (However, I got the
> memory size initialization wrong; add mem=64M to the kernel command line)
>
> I'll send a patch to fix the mem size tomorrow.
>
> Thanks,
> g.
>
> >
> > Florian wrote:
> >>> I don't have a public git tree at the moment for the xilinx virtex
> >>> stuff.  I can certainly create and maintain one if there is demand.  I
> >>> guess it depends on how many people want to colaborate on V2Pro/V4
> >>> support.  Anyone else interested?
> >>
> >>
> >> Yes. I am also working on a Virtex-4 system with Linux.
> >> Do you support also a Linux 2.4 tree?
> > Sorry, no.  I'm focusing on the 2.6 stuff.  IIRC, the Denx tree is
> > tracking the virtex support in 2.4.
> >
> > Are you strictly working on 2.4?  Or are you interested in 2.6 as well?
> >
> > Cheers,
> > g.
> >
> >
> > 
> >
> > ___
> > Linuxppc-embedded mailing list
> > Linuxppc-embedded at ozlabs.org
> > https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
>
> --
> Grant Likely, B.Sc. P.Eng.
> Secret Lab Technologies Ltd.
> (403) 663-0761
>
-- next part --
An HTML attachment was scrubbed...
URL: 
http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20060103/f97c282e/attachment.htm
 


[PATCH 8/8] Add support for Xilinx ML403 reference design

2006-01-03 Thread Paula Saameño
I am working with ML403 as well. Right now, I am using a 2.4.26 kernel, but
I would be interested in a 2.6 one, it would be great!!

Happy 2006!!
Paula Saameno

Florian wrote:
>> I don't have a public git tree at the moment for the xilinx virtex
>> stuff.  I can certainly create and maintain one if there is demand.  I
>> guess it depends on how many people want to colaborate on V2Pro/V4
>> support.  Anyone else interested?
>
>
> Yes. I am also working on a Virtex-4 system with Linux.
> Do you support also a Linux 2.4 tree?
Sorry, no.  I'm focusing on the 2.6 stuff.  IIRC, the Denx tree is
tracking the virtex support in 2.4.

Are you strictly working on 2.4?  Or are you interested in 2.6 as well?

Cheers,
g.
-- next part --
An HTML attachment was scrubbed...
URL: 
http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20060103/aad404c1/attachment.htm
 


[PATCH 8/8] Add support for Xilinx ML403 reference design

2006-01-03 Thread Grant Likely
Paula Saame?o wrote:
> Hi Grant,
> 
> I?ll try the patches today and I let you know how is going.

BTW, 'make ml403_defconfig' should work


> 
> See you!
> 
> On 1/3/06, *Grant Likely*  > wrote:
> 
> Paula Saame?o wrote:
> > I am working with ML403 as well. Right now, I am using a 2.4.26
> kernel,
> > but I would be interested in a 2.6 one, it would be great!!
> >
> > Happy 2006!!
> > Paula Saameno
> 
> Thanks Paula.
> 
> Can you try the posted patches on your ML403?  It should compile and
> boot with no problems with the reference design.  (However, I got the
> memory size initialization wrong; add mem=64M to the kernel command
> line)
> 
> I'll send a patch to fix the mem size tomorrow.
> 
> Thanks,
> g.
> 
> >
> > Florian wrote:
> >>> I don't have a public git tree at the moment for the xilinx virtex
> >>> stuff.  I can certainly create and maintain one if there is
> demand.  I
> >>> guess it depends on how many people want to colaborate on V2Pro/V4
> >>> support.  Anyone else interested?
> >>
> >>
> >> Yes. I am also working on a Virtex-4 system with Linux.
> >> Do you support also a Linux 2.4 tree?
> > Sorry, no.  I'm focusing on the 2.6 stuff.  IIRC, the Denx tree is
> > tracking the virtex support in 2.4.
> >
> > Are you strictly working on 2.4?  Or are you interested in 2.6 as
> well?
> >
> > Cheers,
> > g.
> >
> >
> >
> 
> >
> > ___
> > Linuxppc-embedded mailing list
> > Linuxppc-embedded at ozlabs.org 
> > https://ozlabs.org/mailman/listinfo/linuxppc-embedded
> 
> 
> --
> Grant Likely, B.Sc. P.Eng.
> Secret Lab Technologies Ltd.
> (403) 663-0761
> 
> 


-- 
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
(403) 663-0761




[PATCH 8/8] Add support for Xilinx ML403 reference design

2006-01-03 Thread Grant Likely
Paula Saame?o wrote:
> I am working with ML403 as well. Right now, I am using a 2.4.26 kernel,
> but I would be interested in a 2.6 one, it would be great!!
> 
> Happy 2006!!
> Paula Saameno

Thanks Paula.

Can you try the posted patches on your ML403?  It should compile and
boot with no problems with the reference design.  (However, I got the
memory size initialization wrong; add mem=64M to the kernel command line)

I'll send a patch to fix the mem size tomorrow.

Thanks,
g.

> 
> Florian wrote:
>>> I don't have a public git tree at the moment for the xilinx virtex
>>> stuff.  I can certainly create and maintain one if there is demand.  I
>>> guess it depends on how many people want to colaborate on V2Pro/V4
>>> support.  Anyone else interested?
>>
>>
>> Yes. I am also working on a Virtex-4 system with Linux.
>> Do you support also a Linux 2.4 tree?
> Sorry, no.  I'm focusing on the 2.6 stuff.  IIRC, the Denx tree is
> tracking the virtex support in 2.4.
> 
> Are you strictly working on 2.4?  Or are you interested in 2.6 as well?
> 
> Cheers,
> g.
> 
> 
> 
> 
> ___
> Linuxppc-embedded mailing list
> Linuxppc-embedded at ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded


-- 
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
(403) 663-0761



[PATCH 8/8] Add support for Xilinx ML403 reference design

2006-01-03 Thread Grant Likely
Florian wrote:
>>> Yes. I am also working on a Virtex-4 system with Linux.
>>> Do you support also a Linux 2.4 tree?
>>
>>
>> Sorry, no.  I'm focusing on the 2.6 stuff.  IIRC, the Denx tree is
>> tracking the virtex support in 2.4.
>>
>> Are you strictly working on 2.4?  Or are you interested in 2.6 as well?
> 
> 
> I am working with the Montavista 2.4 sources.
> 2.6 is also possible but I read 2.6 is not better than 2.4 for embedded
> systems.
> We didn't make a final decision so you can convince me to try 2.6.
Nah, that sounds like to much work.  :)  Choose what works for you.  If
2.4 has the features you need then go for it.  (just keep in mind that
most new development it focused on 2.6)

g.

-- 
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
(403) 663-0761



[PATCH 8/8] Add support for Xilinx ML403 reference design

2006-01-02 Thread Grant Likely
David H. Lynch Jr. wrote:
> Grant Likely wrote:
> 
>>David H. Lynch Jr. wrote:
> 
> 
>>Since the E-12 is a commercially available board, it would be useful to
>>have the patches on the ML, even if they don't get applied to mainline.
> 
> 
>   So at what state should things be at before posting them ?
> 
>   Right now:
>   The basic E-12 stuff is complete - though it couls use some 
> polish. It
> was based on the ML300 code, and almost certainly overlaps and conflicts
> with your ML403 work. I would be happy to reconcile them, but I would
> need to know what to work against.
If you want initial comments, then don't worry about polish; Send your
raw diff (in unified format please!) and put [RFC] in the subject line
so nobody mistakes it as stable code.  :)  I'll happily comment on it.

I'm sure it conflicts with my ML403 work considering I've moved from the
OCP to the platform bus.

> 
>   I am not a git expert at this point. 
Neither am I.  :)

Try this:
install GIT: http://linux.yyz.us/git-howto.html#installing_git
install Cogito:  http://www.kernel.org/pub/software/scm/cogito/README
easy user guide: http://wellington.pm.org/archive/200510/git/

> I am working against the 2.6.14.5
> source3 on kernel.org. There are numerous git trees what is the right one ?
I'm using Linus's tree, seeked to tag v2.6.14.

git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

> 
>   
>   The serial/console drivers for the "Keyhole" - a bidirectional 
> link
> between a Linux/Windows development host and the E-12, and the Xilinx
> UartLite are in (hopefully) late debugging, Output is probably complete,
> UartLite input needs testing, Keyhole input needs alot of work - among
> other things the host side is still only a display, so it is somewhat
> difficult to do the Linux input side.
> 


-- 
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
(403) 663-0761



[PATCH 8/8] Add support for Xilinx ML403 reference design

2006-01-02 Thread Grant Likely
Florian wrote:
>> I don't have a public git tree at the moment for the xilinx virtex
>> stuff.  I can certainly create and maintain one if there is demand.  I
>> guess it depends on how many people want to colaborate on V2Pro/V4
>> support.  Anyone else interested?
> 
> 
> Yes. I am also working on a Virtex-4 system with Linux.
> Do you support also a Linux 2.4 tree?
Sorry, no.  I'm focusing on the 2.6 stuff.  IIRC, the Denx tree is
tracking the virtex support in 2.4.

Are you strictly working on 2.4?  Or are you interested in 2.6 as well?

Cheers,
g.

-- 
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
(403) 663-0761



[PATCH 8/8] Add support for Xilinx ML403 reference design

2005-12-31 Thread David H. Lynch Jr.
Grant Likely wrote:
> David H. Lynch Jr. wrote:

> 
> Since the E-12 is a commercially available board, it would be useful to
> have the patches on the ML, even if they don't get applied to mainline.

So at what state should things be at before posting them ?

Right now:
The basic E-12 stuff is complete - though it couls use some 
polish. It
was based on the ML300 code, and almost certainly overlaps and conflicts
with your ML403 work. I would be happy to reconcile them, but I would
need to know what to work against.

I am not a git expert at this point. I am working against the 
2.6.14.5
source3 on kernel.org. There are numerous git trees what is the right one ?


The serial/console drivers for the "Keyhole" - a bidirectional 
link
between a Linux/Windows development host and the E-12, and the Xilinx
UartLite are in (hopefully) late debugging, Output is probably complete,
UartLite input needs testing, Keyhole input needs alot of work - among
other things the host side is still only a display, so it is somewhat
difficult to do the Linux input side.



[PATCH 8/8] Add support for Xilinx ML403 reference design

2005-12-30 Thread Grant Likely
David H. Lynch Jr. wrote:
>   I am working on a port of 2.6.14.5 to the Pico E-12 which is a Xilinx
> Virtex-IV system in a CF card. It is very similar to the ML403 but with
> alot less hardware. I would love to be able to pull a whole tree of the
> stuff you are working on - is there a git, svn, or cvs tree that the
> linuxppc-embedded patches are getting merged into ? and How can it be
> accessed ?
I don't have a public git tree at the moment for the xilinx virtex
stuff.  I can certainly create and maintain one if there is demand.  I
guess it depends on how many people want to colaborate on V2Pro/V4
support.  Anyone else interested?

>   Right now I am trying to get /init to run - actually it runs but I am
> not getting IO on the console. Anyway, I hope to put out a collection of
> patches when I have it really working. Aside from the Pico  e-12 itself,
> I have Uartlite drivers that are consistent with the way the rest of the
> 2.6 serial drivers are layed out as well as a custom serial driver
> specific to the E-12. The E-12 stuff might not make it into the
> distribution kernel, but I would think there might be some interest in
> the UartLite driver.
Since the E-12 is a commercially available board, it would be useful to
have the patches on the ML, even if they don't get applied to mainline.

> 
>   Anyway it would be nice to work against whatever all the
> linuxppc-embedded patches are going into.
I'm working off the mainline linux-2.6 tree from kernel.org.  PPC
patches are getting merged into mainline frequently.

Cheers,
g.

-- 
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
(403) 663-0761



[PATCH 8/8] Add support for Xilinx ML403 reference design

2005-12-30 Thread Grant Likely
Add support for Xilinx ML403 reference design

Signed-off-by: Grant C. Likely 

---

 arch/ppc/boot/simple/embed_config.c  |   41 +
 arch/ppc/platforms/4xx/Kconfig   |8 +
 arch/ppc/platforms/4xx/Makefile  |2 
 arch/ppc/platforms/4xx/xilinx_ml403.c|  177 ++
 arch/ppc/platforms/4xx/xilinx_ml403.h|   49 ++
 arch/ppc/platforms/4xx/xparameters/xparameters.h |   13 ++
 include/asm-ppc/ibm4xx.h |4 
 7 files changed, 291 insertions(+), 3 deletions(-)
 create mode 100644 arch/ppc/platforms/4xx/xilinx_ml403.c
 create mode 100644 arch/ppc/platforms/4xx/xilinx_ml403.h

03eaaad1784a4094cecd57f3aafbfe8832742505
diff --git a/arch/ppc/boot/simple/embed_config.c 
b/arch/ppc/boot/simple/embed_config.c
index df24202..0172eb0 100644
--- a/arch/ppc/boot/simple/embed_config.c
+++ b/arch/ppc/boot/simple/embed_config.c
@@ -745,7 +745,7 @@ embed_config(bd_t **bdp)
 }
 #endif /* WILLOW */
 
-#ifdef CONFIG_XILINX_ML300
+#if defined(CONFIG_XILINX_ML300)
 void
 embed_config(bd_t ** bdp)
 {
@@ -784,6 +784,45 @@ embed_config(bd_t ** bdp)
 }
 #endif /* CONFIG_XILINX_ML300 */
 
+#if defined(CONFIG_XILINX_ML403)
+void
+embed_config(bd_t ** bdp)
+{
+   static const unsigned long line_size = 32;
+   static const unsigned long congruence_classes = 256;
+   unsigned long addr;
+   unsigned long dccr;
+   bd_t *bd;
+
+   /*
+* Invalidate the data cache if the data cache is turned off.
+* - The 405 core does not invalidate the data cache on power-up
+*   or reset but does turn off the data cache. We cannot assume
+*   that the cache contents are valid.
+* - If the data cache is turned on this must have been done by
+*   a bootloader and we assume that the cache contents are
+*   valid.
+*/
+   __asm__("mfdccr %0": "=r" (dccr));
+   if (dccr == 0) {
+   for (addr = 0;
+addr < (congruence_classes * line_size);
+addr += line_size) {
+   __asm__("dccci 0,%0": :"b"(addr));
+   }
+   }
+
+   bd = &bdinfo;
+   *bdp = bd;
+   bd->bi_memsize = XPAR_PLB_DDR_0_MEM0_HIGHADDR + 1;
+   bd->bi_intfreq = XPAR_CPU_PPC405_CORE_CLOCK_FREQ_HZ;
+   bd->bi_busfreq = XPAR_XUARTNS550_CLOCK_HZ;
+   bd->bi_pci_busfreq = 0;
+   timebase_period_ns = 10 / bd->bi_tbfreq;
+   /* see bi_tbfreq definition in arch/ppc/platforms/4xx/xilinx_ml300.h */
+}
+#endif /* CONFIG_XILINX_ML403 */
+
 #ifdef CONFIG_IBM_OPENBIOS
 /* This could possibly work for all treeboot roms.
 */
diff --git a/arch/ppc/platforms/4xx/Kconfig b/arch/ppc/platforms/4xx/Kconfig
index 266280c..f7a5848 100644
--- a/arch/ppc/platforms/4xx/Kconfig
+++ b/arch/ppc/platforms/4xx/Kconfig
@@ -57,6 +57,10 @@ config XILINX_ML300
help
  This option enables support for the Xilinx ML300 evaluation board.
 
+config XILINX_ML403
+   bool "Xilinx-ML403"
+   help
+ This option enables support for the Xilinx ML403 evaluation board.
 endchoice
 
 choice
@@ -194,7 +198,7 @@ config 405GPR
 
 config XILINX_VIRTEX
bool
-   depends on XILINX_ML300
+   depends on XILINX_ML300 || XILINX_ML403
default y
 
 config STB03xxx
@@ -204,7 +208,7 @@ config STB03xxx
 
 config EMBEDDEDBOOT
bool
-   depends on EP405 || XILINX_ML300
+   depends on EP405 || XILINX_ML300 || XILINX_ML403
default y
 
 config IBM_OPENBIOS
diff --git a/arch/ppc/platforms/4xx/Makefile b/arch/ppc/platforms/4xx/Makefile
index 4db749d..9dd5629 100644
--- a/arch/ppc/platforms/4xx/Makefile
+++ b/arch/ppc/platforms/4xx/Makefile
@@ -13,6 +13,7 @@ obj-$(CONFIG_REDWOOD_6)   += redwood6.o
 obj-$(CONFIG_SYCAMORE) += sycamore.o
 obj-$(CONFIG_WALNUT)   += walnut.o
 obj-$(CONFIG_XILINX_ML300) += xilinx_ml300.o
+obj-$(CONFIG_XILINX_ML403) += xilinx_ml403.o
 
 obj-$(CONFIG_405GP)+= ibm405gp.o
 obj-$(CONFIG_REDWOOD_5)+= ibmstb4.o
@@ -25,3 +26,4 @@ obj-$(CONFIG_440SP)   += ibm440sp.o
 obj-$(CONFIG_405EP)+= ibm405ep.o
 obj-$(CONFIG_405GPR)   += ibm405gpr.o
 obj-$(CONFIG_XILINX_VIRTEX)+= virtex.o
+
diff --git a/arch/ppc/platforms/4xx/xilinx_ml403.c 
b/arch/ppc/platforms/4xx/xilinx_ml403.c
new file mode 100644
index 000..4c0c7e4
--- /dev/null
+++ b/arch/ppc/platforms/4xx/xilinx_ml403.c
@@ -0,0 +1,177 @@
+/*
+ * arch/ppc/platforms/4xx/xilinx_ml403.c
+ *
+ * Xilinx ML403 evaluation board initialization
+ *
+ * Author: Grant Likely 
+ *
+ * 2005 (c) Secret Lab Technologies Ltd.
+ * 2002-2004 (c) MontaVista Software, Inc.
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2.  This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include