powerpc/85xx: Enable ESDHC111 Erratum on P2010/P2020 SoCs
Subsystems (2)
PATCH 1/3 powerpc/85xx: Enable ESDHC111 Erratum on P2010/P2020 SoCs
--- arch/powerpc/include/asm/config_mpc85xx.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/powerpc/include/asm/config_mpc85xx.h +2 -0
@@ -130,11 +130,13 @@#define CONFIG_MAX_CPUS 1#define CONFIG_SYS_FSL_NUM_LAWS 12#define CONFIG_SYS_FSL_SEC_COMPAT 2 +#define CONFIG_SYS_FSL_ERRATUM_ESDHC111 #elif defined(CONFIG_P2020 )#define CONFIG_MAX_CPUS 2#define CONFIG_SYS_FSL_NUM_LAWS 12#define CONFIG_SYS_FSL_SEC_COMPAT 2 +#define CONFIG_SYS_FSL_ERRATUM_ESDHC111 #elif defined(CONFIG_PPC_P2040 )#define CONFIG_MAX_CPUS 4
Signature · 1 line
1.7.2.3
PATCH 2/3 fsl_esdhc: Add the workaround for erratum ESDHC-A001 (enable on P2020)
Data timeout counter (SYSCTL[DTOCV]) is not reliable for values of 4, 8, and 12. Program one more than the desired value: 4 -> 5, 8 -> 9, 12 -> 13.
--- arch/powerpc/cpu/mpc85xx/cmd_errata.c | 3 +++ arch/powerpc/include/asm/config_mpc85xx.h | 2 ++ drivers/mmc/fsl_esdhc.c | 5 +++++ 3 files changed, 10 insertions(+), 0 deletions(-)
arch/powerpc/cpu/mpc85xx/cmd_errata.c +3 -0
@@ -59,6 +59,9 @@ static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])#if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC136 )puts ("Work-around for Erratum ESDHC136 enabled\n" );#endif +#if defined(CONFIG_SYS_FSL_ERRATUM_ESDHC_A001 ) +puts ("Work-around for Erratum ESDHC-A001 enabled\n" ); +#endif #ifdef CONFIG_SYS_FSL_ERRATUM_CPC_A002 puts ("Work-around for Erratum CPC-A002 enabled\n" );#endif
arch/powerpc/include/asm/config_mpc85xx.h +2 -0
@@ -131,12 +131,14 @@#define CONFIG_SYS_FSL_NUM_LAWS 12#define CONFIG_SYS_FSL_SEC_COMPAT 2#define CONFIG_SYS_FSL_ERRATUM_ESDHC111 +#define CONFIG_SYS_FSL_ERRATUM_ESDHC_A001 #elif defined(CONFIG_P2020 )#define CONFIG_MAX_CPUS 2#define CONFIG_SYS_FSL_NUM_LAWS 12#define CONFIG_SYS_FSL_SEC_COMPAT 2#define CONFIG_SYS_FSL_ERRATUM_ESDHC111 +#define CONFIG_SYS_FSL_ERRATUM_ESDHC_A001 #elif defined(CONFIG_PPC_P2040 )#define CONFIG_MAX_CPUS 4
drivers/mmc/fsl_esdhc.c +5 -0
@@ -219,6 +219,11 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)if (timeout <0 ) timeout =0 ; +#ifdef CONFIG_SYS_FSL_ERRATUM_ESDHC_A001 +if ((timeout ==4 ) || (timeout ==8 ) || (timeout ==12 )) + timeout++; +#endif +esdhc_clrsetbits32 (®s->sysctl,SYSCTL_TIMEOUT_MASK , timeout <<16 );return 0 ;
Signature · 1 line
1.7.2.3
PATCH 3/3 powerpc/85xx: Add eSDHC support on P2020DS
From: Jerry Huang <[email protected]>
We enable SDHC_CD and SDHC_WP signals (pin muxed with GPIO8 & GPIO9 respectively).
We enable EXT2, FAT, and parition support for both MMC & USB configs.
--- board/freescale/p2020ds/p2020ds.c | 15 ++++++++++++++- include/configs/P2020DS.h | 25 ++++++++++++++++++++++++- 2 files changed, 38 insertions(+), 2 deletions(-)
board/freescale/p2020ds/p2020ds.c +14 -1
@@ -1,5 +1,5 @@/* -* Copyright 2007-2010 Freescale Semiconductor, Inc. +* Copyright 2007-2011 Freescale Semiconductor, Inc. * * See file CREDITS for list of people who contributed to this * project.
@@ -44,6 +44,19 @@DECLARE_GLOBAL_DATA_PTR ; +int board_early_init_f (void ) +{ +#ifdef CONFIG_MMC +ccsr_gur_t *gur = (ccsr_gur_t *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); + +setbits_be32 (&gur->pmuxcr, + (MPC85xx_PMUXCR_SDHC_CD | + MPC85xx_PMUXCR_SDHC_WP)); +#endif + +return 0 ; +} +int checkboard (void ) {u8 sw;
include/configs/P2020DS.h +24 -1
@@ -78,6 +78,8 @@#define CONFIG_L2_CACHE /* toggle L2 cache */ #define CONFIG_BTB /* toggle branch predition */ +#define CONFIG_BOARD_EARLY_INIT_F /* Call board_pre_init */ +#define CONFIG_ENABLE_36BIT_PHYS 1#ifdef CONFIG_PHYS_64BIT
@@ -605,15 +607,36 @@/* * USB */ +#define CONFIG_USB_EHCI + +#ifdef CONFIG_USB_EHCI #define CONFIG_CMD_USB #define CONFIG_USB_STORAGE -#define CONFIG_USB_EHCI #define CONFIG_USB_EHCI_FSL #define CONFIG_EHCI_HCD_INIT_AFTER_RESET +#endif #undef CONFIG_WATCHDOG/* watchdog disabled */ /* +* SDHC/MMC +*/ +#define CONFIG_MMC + +#ifdef CONFIG_MMC +#define CONFIG_FSL_ESDHC +#define CONFIG_SYS_FSL_ESDHC_ADDR CONFIG_SYS_MPC85xx_ESDHC_ADDR +#define CONFIG_CMD_MMC +#define CONFIG_GENERIC_MMC +#endif + +#if defined(CONFIG_MMC ) || defined(CONFIG_USB_EHCI ) +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_FAT +#define CONFIG_DOS_PARTITION +#endif + +/* * Miscellaneous configurable options */ #define CONFIG_SYS_LONGHELP /* undef to save memory */
Signature · 1 line
1.7.2.3
Kumar Gala
AppliedPATCH 1/3 powerpc/85xx: Enable ESDHC111 Erratum on P2010/P2020 SoCs
In reply to Kumar GalaQuoted 4 lines · Kumar Gala
Signed-off-by Kumar Gala <[email protected]>---
arch/powerpc/include/asm/config_mpc85xx.h| 2 ++1 files changed, 2 insertions(+), 0 deletions(-)
applied to 85xx
- k
Kumar Gala
AppliedPATCH 2/3 fsl_esdhc: Add the workaround for erratum ESDHC-A001 (enable on P2020)
In reply to Kumar GalaQuoted 9 lines · Kumar Gala
Data timeout counter (SYSCTL[DTOCV]) is not reliable for values of 4, 8, and 12. Program one more than the desired value: 4 -> 5, 8 -> 9, 12 -> 13.
Signed-off-by Kumar Gala <[email protected]>---
arch/powerpc/cpu/mpc85xx/cmd_errata.c | 3 +++ arch/powerpc/include/asm/config_mpc85xx.h | 2 ++ drivers/mmc/fsl_esdhc.c | 5 +++++ 3 files changed, 10 insertions(+), 0 deletions(-)
applied to 85xx
- k
Kumar Gala
AppliedPATCH 3/3 powerpc/85xx: Add eSDHC support on P2020DS
In reply to Kumar GalaQuoted 7 lines · Kumar Gala
From: Jerry Huang <[email protected]>
We enable
SDHC_CDandSDHC_WPsignals (pin muxed with GPIO8 & GPIO9 respectively).We enable EXT2, FAT, and parition support for both MMC & USB configs.
Quoted 7 lines
Signed-off-by Jerry Huang <[email protected]>Signed-off-by Jin Qing <[email protected]>Signed-off-by Kumar Gala <[email protected]>---
board/freescale/p2020ds/p2020ds.c | 15 ++++++++++++++- include/configs/P2020DS.h | 25 ++++++++++++++++++++++++- 2 files changed, 38 insertions(+), 2 deletions(-)
applied to 85xx next
- k