diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2017-07-31 20:21:02 +0200 |
---|---|---|
committer | Lucas Stach <l.stach@pengutronix.de> | 2017-07-31 20:21:02 +0200 |
commit | b5d57479e7e492a2b1a3299faeaffa68a1aa6519 (patch) | |
tree | 5de529362ecb2813d4b0601b4d9b7187a7c88f85 | |
parent | b428c4d490c72b192a891542244785ca51a59ab0 (diff) | |
parent | 36282ba507d65cf9aac535201ae673e32f94379e (diff) | |
download | barebox-b5d57479e7e492a2b1a3299faeaffa68a1aa6519.tar.gz barebox-b5d57479e7e492a2b1a3299faeaffa68a1aa6519.tar.xz |
Merge branch 'for-next/socfpga'
-rw-r--r-- | Documentation/boards/socfpga.rst | 15 | ||||
-rwxr-xr-x | scripts/socfpga_get_sequencer | 25 |
2 files changed, 20 insertions, 20 deletions
diff --git a/Documentation/boards/socfpga.rst b/Documentation/boards/socfpga.rst index 358e5ab910..2b6c8a5b16 100644 --- a/Documentation/boards/socfpga.rst +++ b/Documentation/boards/socfpga.rst @@ -124,12 +124,19 @@ where `<SPL_GENERATED_DIR>` is the directory where the bsp-editor generated the `<ISW_HANDOFF>` is the directory where Quartus generated the handoff files, and `<BOARD_DIRECTORY>` is your board directory under `arch/arm/boards`. -The following files are generic and belong into the -`arch/arm/mach-socfpga` directory tree: + +Integrating new SDRAM driver +---------------------------- + +This step must only be executed if the SDRAM driver needs updates. It is not necessary +for adding a new board to barebox. + +The following files are generic and belong into the `arch/arm/mach-socfpga` directory +tree: * sdram_io.h -* sequencer.c -* sequencer.h +* sequencer.c as cyclone5-sequencer.c +* sequencer.h as cyclone5-sequencer.h * sequencer_defines.h * system.h * tclrpt.h diff --git a/scripts/socfpga_get_sequencer b/scripts/socfpga_get_sequencer index e0f2e6de2a..36f67498bc 100755 --- a/scripts/socfpga_get_sequencer +++ b/scripts/socfpga_get_sequencer @@ -41,14 +41,18 @@ copy_source() { sed -i 's/alt_8/int8_t/g' $tgt sed -i 's/#include "alt_types.h"//g' $tgt - echo " Fixing include pathes..." + echo " Fixing include paths..." # Fix include pathes - sed -i 's/#include <sdram.h>/#include <mach\/sdram.h>/g' $tgt + sed -i 's/#include <sdram.h>/#include <mach\/cyclone5-sdram.h>/g' $tgt sed -i 's/#include "sequencer_auto.h"//g' $tgt + sed -i 's/#include "sequencer.h"/#include "cyclone5-sequencer.h"/g' $tgt echo " Automated readability fixup..." indent -npro -kr -i8 -ts8 -sob -l100 -ss -ncs -cp1 -il0 $tgt + echo " Whitespace cleanup..." + sed -i 's/[ \t]\+$//' $tgt + echo " Running coccinelle cleanups..." spatch -sp_file scripts/coccinelle/misc/altera_sequencer.cocci -in_place arch/arm/mach-socfpga/include/mach @@ -61,19 +65,10 @@ copy_source() { sed -i 's/^static void rw_mgr_decr_vfifo_auto(uint32_t grp);$//g' $tgt } -copy_source ${ubootsrc}/board/altera/socfpga/sdram/sequencer.c arch/arm/mach-socfpga/include/mach/sequencer.c -sed -i 's/static int sdram_calibration(void)/static int socfpga_mem_calibration(void)/g' arch/arm/mach-socfpga/include/mach/sequencer.c - -cat <<'EOF' > arch/arm/mach-socfpga/include/mach/sequencer_defines.h -#define TINIT_CNTR1_VAL 32 -#define TINIT_CNTR2_VAL 32 -#define TINIT_CNTR0_VAL 99 -#define TRESET_CNTR1_VAL 99 -#define TRESET_CNTR2_VAL 10 -#define TRESET_CNTR0_VAL 99 -EOF +copy_source ${ubootsrc}/board/altera/socfpga/sdram/sequencer.c arch/arm/mach-socfpga/include/mach/cyclone5-sequencer.c +sed -i 's/static int sdram_calibration(void)/static int socfpga_mem_calibration(void)/g' arch/arm/mach-socfpga/include/mach/cyclone5-sequencer.c -copy_source ${ubootsrc}/board/altera/socfpga/sdram/sequencer.h arch/arm/mach-socfpga/include/mach/sequencer.h +copy_source ${ubootsrc}/board/altera/socfpga/sdram/sequencer.h arch/arm/mach-socfpga/include/mach/cyclone5-sequencer.h copy_source ${ubootsrc}/board/altera/socfpga/sdram/tclrpt.h arch/arm/mach-socfpga/include/mach/tclrpt.h copy_source ${ubootsrc}/board/altera/socfpga/sdram/sdram_io.h arch/arm/mach-socfpga/include/mach/sdram_io.h cat <<'EOF' >> arch/arm/mach-socfpga/include/mach/sdram_io.h @@ -85,7 +80,5 @@ cat <<'EOF' >> arch/arm/mach-socfpga/include/mach/sdram_io.h EOF copy_source ${ubootsrc}/board/altera/socfpga/sdram/system.h arch/arm/mach-socfpga/include/mach/system.h -#unifdef -f ${sequencer_defines} ${ubootsrc}/board/altera/socfpga/sdram/tclrpt.c -o arch/arm/mach-socfpga/include/mach/tclrpt.c - echo "DONE" |