use common code for mvBL-M7 (MPC8343)
PATCH 2/2 use common code for mvBL-M7 (MPC8343)
This patch makes use of common code, i.e. removes duplicate board specific code.
Fix wrong GPIO direction.
---
Kim,
please note that this patch depends on WD applying the "add common code" patch.
Cheers,
Andr??
board/matrix_vision/mvblm7/mvblm7.c | 54 +++++++++++++++------------------- board/matrix_vision/mvblm7/mvblm7.h | 3 +- board/matrix_vision/mvblm7/pci.c | 32 ++------------------ 3 files changed, 29 insertions(+), 60 deletions(-)
(quoted diff) +0 -0
b/board/matrix_vision/mvblm7/mvblm7.c
index 6984af9..53d873a 100644
board/matrix_vision/mvblm7/mvblm7.c +24 -30
86 lines not on this page · raw message
(quoted diff) +0 -0
b/board/matrix_vision/mvblm7/mvblm7.h
index 03e9f41..de9fec7 100644
board/matrix_vision/mvblm7/mvblm7.h +0 -2
@@ -8,14 +8,13 @@#define FPGA_DIN 0x20000000#define FPGA_STATUS 0x10000000#define FPGA_CONF_DONE 0x08000000 -#define MMC_CS 0x04000000#define WD_WDI 0x00400000#define WD_TS 0x00200000#define MAN_RST 0x00100000#define MV_GPIO_DAT (WD_TS) -#define MV_GPIO_OUT (FPGA_CONFIG|FPGA_DIN|FPGA_CCLK|WD_TS|WD_WDI|
MMC_CS)
+#define MV_GPIO_OUT (FPGA_CONFIG|FPGA_DIN|FPGA_CCLK|MVBLM7_MMC_CS)
#define MV_GPIO_ODE (FPGA_CONFIG|MAN_RST)
#endif
(quoted diff) +0 -0
b/board/matrix_vision/mvblm7/pci.c
index 9f31719..3ed0b80 100644
board/matrix_vision/mvblm7/pci.c +4 -28
@@ -35,21 +35,6 @@DECLARE_GLOBAL_DATA_PTR ; -int mvblm7_load_fpga (void ) -{ -size_t data_size =0 ; -void *fpga_data =NULL ; -char *datastr =getenv ("fpgadata" ); -char *sizestr =getenv ("fpgadatasize" ); - -if (datastr) - fpga_data = (void *)simple_strtoul (datastr,NULL ,16 ); -if (sizestr) - data_size = (size_t )simple_strtoul (sizestr,NULL ,16 ); - -return fpga_load (0 , fpga_data, data_size); -} -static struct pci_region pci_regions[] = { { bus_start:CONFIG_SYS_PCI1_MEM_BASE ,
@@ -84,32 +69,23 @@ void pci_init_board(void)volatile law83xx_t *pci_law;struct pci_region *reg[] = { pci_regions }; - load_fpga =1 ; immr = (immap_t *)CONFIG_SYS_IMMR ; clk = (clk83xx_t *) &immr->clk; pci_ctrl = immr->pci_ctrl; pci_law = immr->sysconf.pcilaw; gpio = (volatile gpio83xx_t *)&immr->gpio[0 ]; - s =getenv ("skip_fpga" ); -if (s) { -printf ("found 'skip_fpga' -> FPGA _not_ loaded !\n" ); - load_fpga =0 ; - } - gpio->dat =MV_GPIO_DAT ; gpio->odr =MV_GPIO_ODE ; -if (load_fpga) - gpio->dir =MV_GPIO_OUT ; -else - gpio->dir =MV_GPIO_OUT & ~(FPGA_DIN |FPGA_CCLK ); + gpio->dir =MV_GPIO_OUT ;printf ("SICRH / SICRL : 0x%08x / 0x%08x\n" , immr->sysconf.sicrh, immr->sysconf.sicrl);mvblm7_init_fpga (); -if (load_fpga) -mvblm7_load_fpga (); +mv_load_fpga (); + + gpio->dir =MV_GPIO_OUT & ~(FPGA_DIN |FPGA_CCLK );/* Enable PCI_CLK_OUTPUTs 0 and 1 with 1:1 clocking */ clk->occr =0xc0000000 ;
MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschiaeftsf?hrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Hans-Joachim Reich
PATCH 2/2 use common code for mvBL-M7 (MPC8343)
Dear =?ISO-8859-1?Q?Andr=E9?= Schwarz,
Quoted 3 lines · In message <1247836512.3953.70.camel@swa-m460> you wrote:
This patch makes use of common code, i.e. removes duplicate board specific code.
Fix wrong GPIO direction.
Please split this in two patches, and fold the "use common code" part into the "add common code" patch.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de If all the Chinese simultaneously jumped into the Pacific off a 10 foot platform erected 10 feet off their coast, it would cause a tidal wave that would destroy everything in this country west of Nebraska.