Consolidate XILINX_VIRTEX board support.
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 2/3 Consolidate XILINX_VIRTEX board support.
From: Stephen Neuendorffer <[email protected]>
Make support for Xilinx boards more generic, making it easier to add new boards. ML300 and ML403 now use this. Added CONFIG_XILINX_EMBED_CONFIG to do the consolidation, while still allowing boards not in the tree to avoid embed_config.
--- arch/ppc/boot/simple/Makefile | 3 +- arch/ppc/boot/simple/embed_config.c | 4 +- arch/ppc/platforms/4xx/Kconfig | 6 + arch/ppc/platforms/4xx/Makefile | 4 +- arch/ppc/platforms/4xx/xilinx_generic_ppc.c | 133 +++++++++++++++++++++++++++ arch/ppc/platforms/4xx/xilinx_ml300.c | 118 ------------------------ arch/ppc/platforms/4xx/xilinx_ml403.c | 120 ------------------------ 7 files changed, 144 insertions(+), 244 deletions(-) create mode 100644 arch/ppc/platforms/4xx/xilinx_generic_ppc.c delete mode 100644 arch/ppc/platforms/4xx/xilinx_ml300.c delete mode 100644 arch/ppc/platforms/4xx/xilinx_ml403.c
arch/ppc/boot/simple/Makefile +1 -2
@@ -187,8 +187,7 @@ boot-$(CONFIG_REDWOOD_6) += embed_config.o boot-$(CONFIG_8xx) += embed_config.o boot-$(CONFIG_8260) += embed_config.o boot-$(CONFIG_EP405) += embed_config.o -boot-$(CONFIG_XILINX_ML300) += embed_config.o -boot-$(CONFIG_XILINX_ML403) += embed_config.o +boot-$(CONFIG_XILINX_EMBED_CONFIG) += embed_config.o boot-$(CONFIG_BSEIP) += iic.o boot-$(CONFIG_MBX) += iic.o pci.o qspan_pci.o boot-$(CONFIG_MV64X60) += misc-mv64x60.o
arch/ppc/boot/simple/embed_config.c +2 -2
@@ -744,7 +744,7 @@ embed_config(bd_t **bdp) }#endif /* WILLOW */ -#if defined(CONFIG_XILINX_ML300 ) || defined(CONFIG_XILINX_ML403 ) +#if defined(CONFIG_XILINX_EMBED_CONFIG )void embed_config (bd_t ** bdp) {
@@ -781,7 +781,7 @@ embed_config(bd_t ** bdp) timebase_period_ns =1000000000 / bd->bi_tbfreq; /* see bi_tbfreq definition in arch/ppc/platforms/4xx/xilinx_ml300.h */ } -#endif /* CONFIG_XILINX_ML300 || CONFIG_XILINX_ML403 */ +#endif /* CONFIG_XILINX_EMBED_CONFIG */ #ifdef CONFIG_IBM_OPENBIOS /* This could possibly work for all treeboot roms.
arch/ppc/platforms/4xx/Kconfig +6 -0
@@ -57,6 +57,7 @@ config XILINX_ML300 bool "Xilinx-ML300" select XILINX_VIRTEX_II_PRO select EMBEDDEDBOOT + select XILINX_EMBED_CONFIG help This option enables support for the Xilinx ML300 evaluation board.
@@ -64,8 +65,10 @@ config XILINX_ML403 bool "Xilinx-ML403" select XILINX_VIRTEX_4_FX select EMBEDDEDBOOT + select XILINX_EMBED_CONFIG help This option enables support for the Xilinx ML403 evaluation board. + endchoice choice
@@ -229,6 +232,9 @@ config XILINX_VIRTEX_4_FX config XILINX_VIRTEX bool +config XILINX_EMBED_CONFIG + bool + config STB03xxx bool depends on REDWOOD_5 || REDWOOD_6
arch/ppc/platforms/4xx/Makefile +2 -2
@@ -14,8 +14,8 @@ obj-$(CONFIG_REDWOOD_6) += redwood6.o obj-$(CONFIG_SYCAMORE) += sycamore.o obj-$(CONFIG_TAISHAN) += taishan.o obj-$(CONFIG_WALNUT) += walnut.o -obj-$(CONFIG_XILINX_ML300) += xilinx_ml300.o -obj-$(CONFIG_XILINX_ML403) += xilinx_ml403.o +obj-$(CONFIG_XILINX_ML300) += xilinx_generic_ppc.o +obj-$(CONFIG_XILINX_ML403) += xilinx_generic_ppc.o obj-$(CONFIG_405GP) += ibm405gp.o obj-$(CONFIG_REDWOOD_5) += ibmstb4.o
arch/ppc/platforms/4xx/xilinx_generic_ppc.c new file +133 -0
133 lines not on this page · raw message
arch/ppc/platforms/4xx/xilinx_ml300.c deleted +0 -118
118 lines not on this page · raw message
arch/ppc/platforms/4xx/xilinx_ml403.c deleted +0 -120
120 lines not on this page · raw message
Signature · 1 line
1.5.2.1
Quoted 7 lines · On Tue, 2007-08-21 at 17:53 -0700, [email protected] wrote:
From: Stephen Neuendorffer <[email protected]>
Make support for Xilinx boards more generic, making it easier to add new boards. ML300 and ML403 now use this. Added
CONFIG_XILINX_EMBED_CONFIGto do the consolidation, while still allowing boards not in the tree to avoidembed_config.
I like it!
This is exactly what I'll use for my custom board.
RJW
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 3/3 Add support for xupv2p and ml410 boards.
From: Stephen Neuendorffer <[email protected]>
xupv2p support generates MAC addresses based on a silicon serial ID.
--- arch/ppc/platforms/4xx/Kconfig | 16 + arch/ppc/platforms/4xx/Makefile | 2 + arch/ppc/platforms/4xx/xilinx_xupv2p.c | 42 +++ arch/ppc/platforms/4xx/xparameters/xparameters.h | 4 + .../platforms/4xx/xparameters/xparameters_ml41x.h | 277 +++++++++++++++++ .../platforms/4xx/xparameters/xparameters_xupv2p.h | 327 ++++++++++++++++++++ 6 files changed, 668 insertions(+), 0 deletions(-) create mode 100644 arch/ppc/platforms/4xx/xilinx_xupv2p.c create mode 100644 arch/ppc/platforms/4xx/xparameters/xparameters_ml41x.h create mode 100644 arch/ppc/platforms/4xx/xparameters/xparameters_xupv2p.h
arch/ppc/platforms/4xx/Kconfig +16 -0
@@ -61,6 +61,14 @@ config XILINX_ML300 help This option enables support for the Xilinx ML300 evaluation board. +config XILINX_XUPV2P + bool "Xilinx-XUPV2P" + select XILINX_VIRTEX_II_PRO + select EMBEDDEDBOOT + select XILINX_EMBED_CONFIG + help + This option enables support for the Xilinx University Program (XUP) Virtex 2 Pro board. + config XILINX_ML403 bool "Xilinx-ML403" select XILINX_VIRTEX_4_FX
@@ -69,6 +77,14 @@ config XILINX_ML403 help This option enables support for the Xilinx ML403 evaluation board. +config XILINX_ML41x + bool "Xilinx-ML41x" + select XILINX_VIRTEX_4_FX + select EMBEDDEDBOOT + select XILINX_EMBED_CONFIG + help + This option enables support for the Xilinx ML410/411 evaluation boards. + endchoice choice
arch/ppc/platforms/4xx/Makefile +2 -0
@@ -15,7 +15,9 @@ obj-$(CONFIG_SYCAMORE) += sycamore.o obj-$(CONFIG_TAISHAN) += taishan.o obj-$(CONFIG_WALNUT) += walnut.o obj-$(CONFIG_XILINX_ML300) += xilinx_generic_ppc.o +obj-$(CONFIG_XILINX_XUPV2P) += xilinx_generic_ppc.o xilinx_xupv2p.o obj-$(CONFIG_XILINX_ML403) += xilinx_generic_ppc.o +obj-$(CONFIG_XILINX_ML41x) += xilinx_generic_ppc.o obj-$(CONFIG_405GP) += ibm405gp.o obj-$(CONFIG_REDWOOD_5) += ibmstb4.o
arch/ppc/platforms/4xx/xilinx_xupv2p.c new file +42 -0
42 lines not on this page · raw message
arch/ppc/platforms/4xx/xparameters/xparameters.h +4 -0
@@ -15,8 +15,12 @@#if defined(CONFIG_XILINX_ML300 )#include "xparameters_ml300.h" +#elif defined(CONFIG_XILINX_XUPV2P ) +#include "xparameters_xupv2p.h" #elif defined(CONFIG_XILINX_ML403 )#include "xparameters_ml403.h" +#elif defined(CONFIG_XILINX_ML41x) +#include "xparameters_ml41x.h" #else /* Add other board xparameter includes here before the #else */ #error No xparameters_*.h file included
arch/ppc/platforms/4xx/xparameters/xparameters_ml41x.h new file +277 -0
277 lines not on this page · raw message
arch/ppc/platforms/4xx/xparameters/xparameters_xupv2p.h new file +327 -0
327 lines not on this page · raw message
Signature · 1 line
1.5.2.1
Re: [PATCH 3/3] Add support for xupv2p and ml410 boards.
Quoted 3 lines · On Tue, 21 Aug 2007 17:53:13 -0700 [email protected] wrote:
From: Stephen Neuendorffer <[email protected]>
xupv2p support generates MAC addresses based on a silicon serial ID.
General reminder, no new code will be accepted in arch/ppc. It's in bugfix state only.
I of course have no problems with people sending patches for new stuff, but I don't want people to get the idea that it will wind up in tree.
arch/ppc/platforms/4xx/xilinx_xupv2p.c line 14
Quoted 4 lines
arch/ppc/platforms/4xx/xilinx_xupv2p.c new file +4
-0+#include <linux/xilinx_devices.h> +#include <platforms/4xx/xparameters/xparameters.h> + +int virtex_device_fixup (struct platform_device *dev)
Could this be a static function?
arch/ppc/platforms/4xx/xilinx_xupv2p.c line 19
Quoted 5 lines
arch/ppc/platforms/4xx/xilinx_xupv2p.c new file +5
-0+{ +#ifdef XPAR_ONEWIRE_0_BASEADDR +int i; +// Use the Silicon Serial ID attached on the onewire bus to +// generate sensible MAC addresses.
No C++ style comments please.
arch/ppc/platforms/4xx/xilinx_xupv2p.c line 20
Quoted 1 line
arch/ppc/platforms/4xx/xilinx_xupv2p.c new file +1
-0+unsigned char *p_onewire =ioremap (XPAR_ONEWIRE_0_BASEADDR ,6 );
What happens if ioremap fails?
Quoted 26 lines
arch/ppc/platforms/4xx/xilinx_xupv2p.c new file +22
-0+struct xemac_platform_data *pdata = dev->dev.platform_data; +if (strcmp (dev->name,"xilinx_emac" ) ==0 ) { +printk (KERN_INFO "Fixup MAC address for %s:%d\n" , + dev->name, dev->id); +// FIXME.. this doesn't seem to return data that is consistent +// with the self test... why not? + pdata->mac_addr[0 ] =0x00 ; + pdata->mac_addr[1 ] =0x0A ; + pdata->mac_addr[2 ] =0x35 ; + pdata->mac_addr[3 ] = dev->id; + pdata->mac_addr[4 ] = p_onewire[4 ]; + pdata->mac_addr[5 ] = p_onewire[5 ]; +pr_debug (KERN_INFO +"MAC address is now %2x:%2x:%2x:%2x:%2x:%2x\n" , + pdata->mac_addr[0 ], pdata->mac_addr[1 ], + pdata->mac_addr[2 ], pdata->mac_addr[3 ], + pdata->mac_addr[4 ], pdata->mac_addr[5 ]); + } +iounmap (p_onewire); +#endif +return 0 ; +}
arch/ppc/platforms/4xx/xparameters/xparameters_ml41x.h line 8
Quoted 8 lines
arch/ppc/platforms/4xx/xparameters/xparameters_ml41x.h new file +8
-0@@ -0,0 +1,277 @@ + +/******************************************************************* +* +* CAUTION: This file is automatically generated by libgen. +* Version: Xilinx EDK 8.2.02 EDK_Im_Sp2.4 +* DO NOT EDIT. +* +* Copyright (c) 2005 Xilinx, Inc. All rights reserved.
All rights reserved is not compatible with the GPL I don't think...
josh
Re: [PATCH 3/3] Add support for xupv2p and ml410 boards.
In reply to [email protected]Should the xparameters????.h file *really* be included in the tree?
This file is completely board/EDK/ISE/synthesis specific. I'd rather it not be included and have people copy theirs from EDK.
Or as I have done, sym-link it from my EDK project.
Woody.
Quoted 38 lines · On Tue, 2007-08-21 at 17:53 -0700, [email protected] wrote:
From: Stephen Neuendorffer <[email protected]>
arch/ppc/platforms/4xx/xparameters/xparameters.h +4
-0@@ -15,8 +15,12 @@#if defined(CONFIG_XILINX_ML300 )#include "xparameters_ml300.h" +#elif defined(CONFIG_XILINX_XUPV2P ) +#include "xparameters_xupv2p.h" #elif defined(CONFIG_XILINX_ML403 )#include "xparameters_ml403.h" +#elif defined(CONFIG_XILINX_ML41x) +#include "xparameters_ml41x.h" #else /* Add other board xparameter includes here before the #else */ #error No xparameters_*.h file includedarch/ppc/platforms/4xx/xparameters/xparameters_ml41x.h new file +13
-0@@ -0,0 +1,277 @@ + +/******************************************************************* +* +* CAUTION: This file is automatically generated by libgen. +* Version: Xilinx EDK 8.2.02 EDK_Im_Sp2.4 +* DO NOT EDIT. +* +* Copyright (c) 2005 Xilinx, Inc. All rights reserved. +* +* Description: Driver parameters +* +*******************************************************************/ +
Re: [PATCH 3/3] Add support for xupv2p and ml410 boards.
Quoted 5 lines · Robert Woodworth
Should the xparameters????.h file *really* be included in the tree?
This file is completely board/EDK/ISE/synthesis specific. I'd rather it not be included and have people copy theirs from EDK.
Or as I have done, sym-link it from my EDK project.
Including xparams for the default xilinx reference designs seems reasonable to me. For custom designs, not so much.
Cheers,
g.
Signature · 4 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. [email protected] (403) 399-0195
Re: [PATCH 3/3] Add support for xupv2p and ml410 boards.
In reply to Robert WoodworthQuoted 9 lines · Robert Woodworth
Should the xparameters????.h file *really* be included in the tree?
This file is completely board/EDK/ISE/synthesis specific. I'd rather it not be included and have people copy theirs from EDK.
Or as I have done, sym-link it from my EDK project.Woody.
The solution below is in line with what we do in our 2.4 kernel to support
several of our own boards.
When you distribute the kernel you have to distribute the source as well. You thus have to include xparameters.h such the kernel can be rebuild by the receiver.
Esben
Quoted 49 lines
Quoted 28 lines · On Tue, 2007-08-21 at 17:53 -0700, [email protected] wrote:
From: Stephen Neuendorffer <[email protected]>
arch/ppc/platforms/4xx/xparameters/xparameters.h +4
-0@@ -15,8 +15,12 @@#if defined(CONFIG_XILINX_ML300 )#include "xparameters_ml300.h" +#elif defined(CONFIG_XILINX_XUPV2P ) +#include "xparameters_xupv2p.h" #elif defined(CONFIG_XILINX_ML403 )#include "xparameters_ml403.h" +#elif defined(CONFIG_XILINX_ML41x) +#include "xparameters_ml41x.h" #else /* Add other board xparameter includes here before the #else */ #error No xparameters_*.h file includedarch/ppc/platforms/4xx/xparameters/xparameters_ml41x.h new file +3
-0@@ -0,0 +1,277 @@ + +/******************************************************************* +* arch/ppc/platforms/4xx/xparameters/xparameters_ml41x.h line 13
Quoted 10 lines
arch/ppc/platforms/4xx/xparameters/xparameters_ml41x.h new file +10
-0+* CAUTION: This file is automatically generated by libgen. +* Version: Xilinx EDK 8.2.02 EDK_Im_Sp2.4 +* DO NOT EDIT. +* +* Copyright (c) 2005 Xilinx, Inc. All rights reserved. +* +* Description: Driver parameters +* +*******************************************************************/ +_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded