powerpc/p1022ds: Add sdcard and spi boot support to P1022DS
PATCH v2 1/1 powerpc/p1022ds: Add sdcard and spi boot support to P1022DS
---
Changes in v2:
- add Cc
- split up original patch series
board/freescale/p1022ds/p1022ds.c | 4 ++ board/freescale/p1022ds/tlb.c | 10 ++++++ boards.cfg | 4 ++ include/configs/P1022DS.h | 63 ++++++++++++++++++++++++++++++++++--- 4 files changed, 76 insertions(+), 5 deletions(-)
board/freescale/p1022ds/p1022ds.c +4 -0
@@ -37,6 +37,10 @@ int board_early_init_f(void) {ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR; +/* Reset eLBC_DIU and SPI_eLBC in case we are booting from SD */ +clrbits_be32 (&gur->pmuxcr,0x00600000 ); +setbits_be32 (&gur->pmuxcr,0x80000000 ); +/* Set pmuxcr to allow both i2c1 and i2c2 */ setbits_be32 (&gur->pmuxcr,0x1000 );
board/freescale/p1022ds/tlb.c +10 -0
@@ -71,6 +71,16 @@ struct fsl_e_tlb_entry tlb_table[] = { SET_TLB_ENTRY(1, PIXIS_BASE, PIXIS_BASE_PHYS, MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, 0, 7, BOOKE_PAGESZ_4K, 1), + +#if defined(CONFIG_SYS_RAMBOOT ) +SET_TLB_ENTRY (1 ,CONFIG_SYS_DDR_SDRAM_BASE ,CONFIG_SYS_DDR_SDRAM_BASE , +MAS3_SX |MAS3_SW |MAS3_SR ,0 , +0 ,8 ,BOOKE_PAGESZ_1G ,1 ), +SET_TLB_ENTRY (1 ,CONFIG_SYS_DDR_SDRAM_BASE +0x40000000 , +CONFIG_SYS_DDR_SDRAM_BASE +0x40000000 , +MAS3_SX |MAS3_SW |MAS3_SR ,0 , + 0, 9, BOOKE_PAGESZ_1G, 1) +#endif };int num_tlb_entries =ARRAY_SIZE (tlb_table);
boards.cfg +4 -0
@@ -700,6 +700,10 @@ P1021RDB-PC_SDCARD powerpc mpc85xx p1_p2_rdb_pc freesca P1021RDB-PC_SPIFLASH powerpc mpc85xx p1_p2_rdb_pc freescale - p1_p2_rdb_pc:P1021RDB,SPIFLASH P1022DS powerpc mpc85xx p1022ds freescale P1022DS_36BIT powerpc mpc85xx p1022ds freescale - P1022DS:36BIT +P1022DS_36BIT_SDCARD powerpc mpc85xx p1022ds freescale - P1022DS:36BIT,SDCARD +P1022DS_36BIT_SPIFLASH powerpc mpc85xx p1022ds freescale - P1022DS:36BIT,SPIFLASH +P1022DS_SDCARD powerpc mpc85xx p1022ds freescale - P1022DS:SDCARD +P1022DS_SPIFLASH powerpc mpc85xx p1022ds freescale - P1022DS:SPIFLASH P1023RDS powerpc mpc85xx p1023rds freescale - P1023RDS P1023RDS_NAND powerpc mpc85xx p1023rds freescale - P1023RDS:NAND P1024RDB powerpc mpc85xx p1_p2_rdb_pc freescale - p1_p2_rdb_pc:P1024RDB
include/configs/P1022DS.h +58 -5
89 lines not on this page · raw message
Signature · 1 line
1.7.2.5
PATCH v2 1/1 Consider CONFIG_ZERO_BOOTDELAY_CHECK when CONFIG_AUTOBOOT_KEYED is set
When CONFIG_ZERO_BOOTDELAY_CHECK is not defined, bootdelay==0 prevents the check for console input (as stated in README.autoboot). This must also work in CONFIG_AUTOBOOT_KEYED mode.
---
Changes in v2:
- split up original patch series
common/main.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
common/main.c +5 -0
@@ -113,6 +113,11 @@ int abortboot(int bootdelay)u_int presskey_max =0 ;u_int i; +#ifndef CONFIG_ZERO_BOOTDELAY_CHECK +if (bootdelay ==0 ) +return 0 ; +#endif +# ifdef CONFIG_AUTOBOOT_PROMPT printf (CONFIG_AUTOBOOT_PROMPT );# endif
Signature · 1 line
1.7.2.5
PATCH v2 1/1 powerpc/p1022ds: Add sdcard and spi boot support to P1022DS
In reply to Dirk EibachQuoted 18 lines · Dirk Eibach
Signed-off-by Dirk Eibach <[email protected]>Cc Timur Tabi <[email protected]>---
Changes in v2:
- add Cc
- split up original patch series?board/freescale/p1022ds/p1022ds.c | ? ?4 ++ ?board/freescale/p1022ds/tlb.c ? ? | ? 10 ++++++ ?boards.cfg ? ? ? ? ? ? ? ? ? ? ? ?| ? ?4 ++ ?include/configs/P1022DS.h ? ? ? ? | ? 63 ++++++++++++++++++++++++++++++++++---?4 files changed, 76 insertions(+), 5 deletions(-)
board/freescale/p1022ds/p1022ds.c +0
-0
board/freescale/p1022ds/p1022ds.c int board_early_init_f(void) · line 42
Quoted 6 lines
board/freescale/p1022ds/p1022ds.c +3
-0@@ -37,6 +37,10 @@ int board_early_init_f(void) ?{ ? ? ? ?ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR; + ? ? ? /* Reset eLBC_DIU and SPI_eLBC in case we are booting from SD */ + ? ? ? clrbits_be32(&gur->pmuxcr, 0x00600000); + ? ? ? setbits_be32(&gur->pmuxcr, 0x80000000);
Please use clrsetbits_be32().
Quoted 67 lines
board/freescale/p1022ds/p1022ds.c +1
-0+? ? ? ?/* Set pmuxcr to allow both i2c1 and i2c2 */ ? ? ? ?setbits_be32(&gur->pmuxcr,
0x1000);board/freescale/p1022ds/tlb.c +10
-0@@ -71,6 +71,16 @@ struct fsl_e_tlb_entry tlb_table[] = { ? ? ? ?SET_TLB_ENTRY(1, PIXIS_BASE, PIXIS_BASE_PHYS, ? ? ? ? ? ? ? ? ? ? ?MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, ? ? ? ? ? ? ? ? ? ? ?0, 7, BOOKE_PAGESZ_4K, 1), + +#if defined(CONFIG_SYS_RAMBOOT ) + ? ? ? SET_TLB_ENTRY(1, CONFIG_SYS_DDR_SDRAM_BASE, CONFIG_SYS_DDR_SDRAM_BASE, + ? ? ? ? ? ? ? ? ? ? ? MAS3_SX|MAS3_SW|MAS3_SR, 0, + ? ? ? ? ? ? ? ? ? ? ? 0, 8, BOOKE_PAGESZ_1G, 1), + ? ? ? SET_TLB_ENTRY(1, CONFIG_SYS_DDR_SDRAM_BASE + 0x40000000, + ? ? ? ? ? ? ? ? ? ? ? CONFIG_SYS_DDR_SDRAM_BASE + 0x40000000, + ? ? ? ? ? ? ? ? ? ? ? MAS3_SX|MAS3_SW|MAS3_SR, 0, + ? ? ? ? ? ? ? ? ? ? ? 0, 9, BOOKE_PAGESZ_1G, 1) +#endif ?}; ?int num_tlb_entries = ARRAY_SIZE(tlb_table);boards.cfg +0
-0@@ -700,6 +700,10 @@ P1021RDB-PC_SDCARD ? ? ? ? ? powerpc ? ? mpc85xx ? ? p1_p2_rdb_pc ? ? ? ?freesca?P1021RDB-PC_SPIFLASH ? ? ? ? powerpc ? ? mpc85xx ? ?
p1_p2_rdb_pc? ? ? ?freescale ? ? ?- ? ? ? ? ? p1_p2_rdb_pc:P1021RDB,SPIFLASH ?P1022DS ? ? ? ? ? ? ? ? ? ? ?powerpc ? ? mpc85xx ? ? p1022ds ? ? ? ? ? ? freescale
?P1022DS_36BIT ? ? ? ? ? ? ? ?powerpc ? ? mpc85xx ? ? p1022ds ? ? ? ? ? ? freescale ? ? ?- ? ? ? ? ? P1022DS:36BITboards.cfg +4
-0+P1022DS_36BIT_SDCARD ? ? ? ? powerpc ? ? mpc85xx ? ? p1022ds ? ? ? ? ? ? freescale ? ? ?- ? ? ? ? ? P1022DS:36BIT,SDCARD +P1022DS_36BIT_SPIFLASH ? ? ? powerpc ? ? mpc85xx ? ? p1022ds ? ? ? ? ? ? freescale ? ? ?- ? ? ? ? ? P1022DS:36BIT,SPIFLASH +P1022DS_SDCARD ? ? ? ? ? ? ? powerpc ? ? mpc85xx ? ? p1022ds ? ? ? ? ? ? freescale ? ? ?- ? ? ? ? ? P1022DS:SDCARD +P1022DS_SPIFLASH ? ? ? ? ? ? powerpc ? ? mpc85xx ? ? p1022ds ? ? ? ? ? ? freescale ? ? ?- ? ? ? ? ? P1022DS:SPIFLASH?P1023RDS ? ? ? ? ? ? ? ? ? ? powerpc ? ? mpc85xx ? ? p1023rds ? ? ? ? ? ?freescale ? ? ?- ? ? ? ? ? P1023RDS ?P1023RDS_NAND ? ? ? ? ? ? ? ?powerpc ? ? mpc85xx ? ? p1023rds ? ? ? ? ? ?freescale ? ? ?- ? ? ? ? ? P1023RDS:NAND ?P1024RDB ? ? ? ? ? ? ? ? ? ? powerpc ? ? mpc85xx ? ?
p1_p2_rdb_pc? ? ? ?freescale ? ? ?- ? ? ? ? ? p1_p2_rdb_pc:P1024RDBinclude/configs/P1022DS.h +0
-0@@ -26,6 +26,18 @@?#define
CONFIG_P1022DS
?#defineCONFIG_MP? ? ? ? ? ? ? ? ? ? ?/* support multiple processors */include/configs/P1022DS.h +12
-0+#ifdef CONFIG_SDCARD +#define CONFIG_RAMBOOT_SDCARD ? ? ? ? ?1 +#define CONFIG_SYS_TEXT_BASE ? ? ? ? ? 0x11000000 +#define CONFIG_RESET_VECTOR_ADDRESS ? ?0x1107fffc +#endif + +#ifdef CONFIG_SPIFLASH +#define CONFIG_RAMBOOT_SPIFLASH ? ? ? ? ? ? ? ?1 +#define CONFIG_SYS_TEXT_BASE ? ? ? ? ? 0x11000000 +#define CONFIG_RESET_VECTOR_ADDRESS ? ?0x1107fffc +#endif +?#ifndef
CONFIG_SYS_TEXT_BASE
?#defineCONFIG_SYS_TEXT_BASE?0xeff80000
?#endifinclude/configs/P1022DS.h +0
-0@@ -52,8 +64,14 @@?#define
CONFIG_FSL_LAW? ? ? ? ? ? ? ? /* Use common FSL init code */
include/configs/P1022DS.h line 70
Quoted 4 lines
include/configs/P1022DS.h +4
-0+#if 0 +#define CONFIG_SYS_CLK_FREQ ? ?99999000 ?/* get_board_sys_clk() */ +#define CONFIG_DDR_CLK_FREQ ? ?99999000/* get_board_ddr_clk() */ +#else
Why add these lines?
Quoted 11 lines
?#define
CONFIG_SYS_CLK_FREQ? ?get_board_sys_clk() ?#defineCONFIG_DDR_CLK_FREQ? ?get_board_ddr_clk()include/configs/P1022DS.h +2
-0+#endif +?#define
CONFIG_ICS307_REFCLK_HZ? ? ? ?33333000 ?/* ICS307 clock chip ref freq */?/*
include/configs/P1022DS.h +0
-0@@ -138,6 +156,14 @@?#define
CONFIG_SYS_MONITOR_BASE? ? ? ? ? ? ? ?CONFIG_SYS_TEXT_BASE ? ?/* start of monitor */
include/configs/P1022DS.h line 165
Quoted 7 lines
include/configs/P1022DS.h +7
-0+#if defined(CONFIG_RAMBOOT_NAND ) || defined(CONFIG_RAMBOOT_SDCARD ) || \ + ? ? ? defined(CONFIG_RAMBOOT_SPIFLASH) +#define CONFIG_SYS_RAMBOOT +#define CONFIG_SYS_EXTRA_ENV_RELOC +#else +#undef CONFIG_SYS_RAMBOOT +#endif
Is the #undef really necessary?
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
Wolfgang Denk
AppliedPATCH v2 1/1 Consider CONFIG_ZERO_BOOTDELAY_CHECK when CONFIG_AUTOBOOT_KEYED is set
In reply to Dirk EibachDear Dirk Eibach,
Quoted 11 lines · In message <[email protected]> you wrote:
When
CONFIG_ZERO_BOOTDELAY_CHECKis not defined, bootdelay==0 prevents the check for console input (as stated in README.autoboot). This must also work inCONFIG_AUTOBOOT_KEYEDmode.Signed-off-by Dirk Eibach <[email protected]>---
Changes in v2:
- split up original patch seriescommon/main.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
Applied, thanks.
But _please_ use a line length of <70 characters in the subject and the commit message. Thanks.
Best regards,
Wolfgang Denk
Signature · 5 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: [email protected] A door is what a dog is perpetually on the wrong side of. - Ogden Nash