Re: [U-Boot-Users] [PATCH] Add PPC405 External Bus Controller (EBC) Register Field Mnemonics
In message [EMAIL PROTECTED] you wrote: These are actually now used in cpu/ppc4xx/start.S and are probably already included in the latest 4xx pull from Stefan. So, this patch might be a no-op at this point. A slightly different version of this seems to have benn pulled in with your ppc4xx: Enable Primordial Stack for 40x and Unify ECC Handling patch (c821b5f120be), but note that we have for example two different implementations of EBC_BXCR_BAS_ENCODE in include/ppc405.h and include/ppc440.h - the include/ppc405.h was changed with your c821b5f120be commit, while the include/ppc440.h code is much older (63153492 from 3 years ago). Please check that this is as intended. Best regards, Wolfgang Denk -- 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] CONSUMER NOTICE: Because of the Uncertainty Principle, It Is Impossible for the Consumer to Find Out at the Same Time Both Precisely Where This Product Is and How Fast It Is Moving. - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] Add PPC405 External Bus Controller (EBC) Register Field Mnemonics
On Thursday 12 June 2008, Wolfgang Denk wrote: In message [EMAIL PROTECTED] you wrote: These are actually now used in cpu/ppc4xx/start.S and are probably already included in the latest 4xx pull from Stefan. So, this patch might be a no-op at this point. A slightly different version of this seems to have benn pulled in with your ppc4xx: Enable Primordial Stack for 40x and Unify ECC Handling patch (c821b5f120be), but note that we have for example two different implementations of EBC_BXCR_BAS_ENCODE in include/ppc405.h and include/ppc440.h - the include/ppc405.h was changed with your c821b5f120be commit, while the include/ppc440.h code is much older (63153492 from 3 years ago). Please check that this is as intended. We should consolidate these defines into one version. No need to have them defined multiple times, since the EBC IP core should be nearly identical on 405 and 440 systems. Perhaps somebody else (Grant?) will find the time to do this soon. If not I'll add it to my list... Thanks. Best regards, Stefan = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: [EMAIL PROTECTED] = - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] Add PPC405 External Bus Controller (EBC) Register Field Mnemonics
In message [EMAIL PROTECTED] you wrote: Added preprocessor definitions for External Bus Controller (EBC) configuration, bank configuration and access parameter register fields along with a macro for defining them and verifying them against the data sheet or user's manual easier. Tested against AMCC Haleakala. Signed-off-by: Grant Erickson [EMAIL PROTECTED] Are these definitions being used anywhere? I tend to drop this patch because it seems to be just dead code. Stefan, do you agree? Best regards, Wolfgang Denk -- 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] Fascinating, a totally parochial attitude. -- Spock, Metamorphosis, stardate 3219.8 - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
Re: [U-Boot-Users] [PATCH] Add PPC405 External Bus Controller (EBC) Register Field Mnemonics
On 6/11/08 4:00 PM, Wolfgang Denk wrote: In message [EMAIL PROTECTED] you wrote: Added preprocessor definitions for External Bus Controller (EBC) configuration, bank configuration and access parameter register fields along with a macro for defining them and verifying them against the data sheet or user's manual easier. Tested against AMCC Haleakala. Signed-off-by: Grant Erickson [EMAIL PROTECTED] Are these definitions being used anywhere? I tend to drop this patch because it seems to be just dead code. Stefan, do you agree? Best regards, Wolfgang Denk Wolfgang, These are actually now used in cpu/ppc4xx/start.S and are probably already included in the latest 4xx pull from Stefan. So, this patch might be a no-op at this point. Regardless, while they are not used in include/configs/kilauea.h and include/configs/makalu.h yet (but both could and should be) I have used them in the include/config/board.h for the new boards I am supporting for a client. They make it much easier to decode BxAP and BxCR settings than an arbitrary 32-bit hex value. Regards, Grant - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
[U-Boot-Users] [PATCH] Add PPC405 External Bus Controller (EBC) Register Field Mnemonics
Added preprocessor definitions for External Bus Controller (EBC) configuration, bank configuration and access parameter register fields along with a macro for defining them and verifying them against the data sheet or user's manual easier. Tested against AMCC Haleakala. Signed-off-by: Grant Erickson [EMAIL PROTECTED] --- include/ppc405.h | 98 ++ 1 files changed, 98 insertions(+), 0 deletions(-) diff --git a/include/ppc405.h b/include/ppc405.h index 37b121c..009aa68 100644 --- a/include/ppc405.h +++ b/include/ppc405.h @@ -22,6 +22,9 @@ #ifndef__PPC405_H__ #define __PPC405_H__ +#definePPC_REG_BITS32 +#definePPC_REG_VAL(bit, value) ((value) ((PPC_REG_BITS - 1) - (bit))) + #ifndef CONFIG_IOP480 #define CFG_DCACHE_SIZE(16 10) /* For AMCC 405 CPUs */ #else @@ -363,6 +366,101 @@ #endif /* defined(CONFIG_405EZ) */ /** + * External Bus Controller (EBC) + */ + +/* Bank Configuration Register */ +#defineEBC_BXCR_BAS_MASK PPC_REG_VAL(11, 0xFFF) +#define EBC_BXCR_BAS_ENCODE(n) unsigned long)(n))EBC_BXCR_BAS_MASK)0) +#define EBC_BXCR_BS_MASK PPC_REG_VAL(14, 0x7) +#define EBC_BXCR_BS_1MBPPC_REG_VAL(14, 0x0) +#define EBC_BXCR_BS_2MBPPC_REG_VAL(14, 0x1) +#define EBC_BXCR_BS_4MBPPC_REG_VAL(14, 0x2) +#define EBC_BXCR_BS_8MBPPC_REG_VAL(14, 0x3) +#define EBC_BXCR_BS_16MB PPC_REG_VAL(14, 0x4) +#define EBC_BXCR_BS_32MB PPC_REG_VAL(14, 0x5) +#define EBC_BXCR_BS_64MB PPC_REG_VAL(14, 0x6) +#define EBC_BXCR_BS_128MB PPC_REG_VAL(14, 0x7) +#define EBC_BXCR_BU_MASK PPC_REG_VAL(16, 0x3) +#defineEBC_BXCR_BU_NONEPPC_REG_VAL(16, 0x0) +#define EBC_BXCR_BU_R PPC_REG_VAL(16, 0x1) +#define EBC_BXCR_BU_W PPC_REG_VAL(16, 0x2) +#define EBC_BXCR_BU_RW PPC_REG_VAL(16, 0x3) +#define EBC_BXCR_BW_MASK PPC_REG_VAL(18, 0x3) +#define EBC_BXCR_BW_8BIT PPC_REG_VAL(18, 0x0) +#define EBC_BXCR_BW_16BIT PPC_REG_VAL(18, 0x1) +#define EBC_BXCR_BW_32BIT PPC_REG_VAL(18, 0x3) + +/* Bank Access Parameter Register */ +#define EBC_BXAP_BME_ENABLED PPC_REG_VAL(0, 0x1) +#define EBC_BXAP_BME_DISABLED PPC_REG_VAL(0, 0x0) +#define EBC_BXAP_TWT_ENCODE(n) PPC_REG_VAL(8, ((unsigned long)(n)) 0xFF) +#defineEBC_BXAP_FWT_ENCODE(n) PPC_REG_VAL(5, ((unsigned long)(n)) 0x1F) +#defineEBC_BXAP_BWT_ENCODE(n) PPC_REG_VAL(8, ((unsigned long)(n)) 0x7) +#define EBC_BXAP_BCE_DISABLE PPC_REG_VAL(9, 0x0) +#define EBC_BXAP_BCE_ENABLEPPC_REG_VAL(9, 0x1) +#define EBC_BXAP_BCT_MASK PPC_REG_VAL(11, 0x3) +#define EBC_BXAP_BCT_2TRANSPPC_REG_VAL(11, 0x0) +#define EBC_BXAP_BCT_4TRANSPPC_REG_VAL(11, 0x1) +#define EBC_BXAP_BCT_8TRANSPPC_REG_VAL(11, 0x2) +#define EBC_BXAP_BCT_16TRANS PPC_REG_VAL(11, 0x3) +#define EBC_BXAP_CSN_ENCODE(n) PPC_REG_VAL(13, ((unsigned long)(n)) 0x3) +#define EBC_BXAP_OEN_ENCODE(n) PPC_REG_VAL(15, ((unsigned long)(n)) 0x3) +#define EBC_BXAP_WBN_ENCODE(n) PPC_REG_VAL(17, ((unsigned long)(n)) 0x3) +#define EBC_BXAP_WBF_ENCODE(n) PPC_REG_VAL(19, ((unsigned long)(n)) 0x3) +#define EBC_BXAP_TH_ENCODE(n) PPC_REG_VAL(22, ((unsigned long)(n)) 0x7) +#define EBC_BXAP_RE_ENABLEDPPC_REG_VAL(23, 0x1) +#define EBC_BXAP_RE_DISABLED PPC_REG_VAL(23, 0x0) +#define EBC_BXAP_SOR_DELAYED PPC_REG_VAL(24, 0x0) +#define EBC_BXAP_SOR_NONDELAYEDPPC_REG_VAL(24, 0x1) +#define EBC_BXAP_BEM_WRITEONLY PPC_REG_VAL(25, 0x0) +#define EBC_BXAP_BEM_RWPPC_REG_VAL(25, 0x1) +#define EBC_BXAP_PEN_DISABLED PPC_REG_VAL(26, 0x0) +#define EBC_BXAP_PEN_ENABLED PPC_REG_VAL(26, 0x1) + +/* Configuration Register */ +#define EBC_CFG_LE_MASKPPC_REG_VAL(0, 0x1) +#define EBC_CFG_LE_UNLOCK PPC_REG_VAL(0, 0x0) +#define EBC_CFG_LE_LOCKPPC_REG_VAL(0, 0x1) +#define EBC_CFG_PTD_MASK PPC_REG_VAL(1, 0x1) +#define EBC_CFG_PTD_ENABLE PPC_REG_VAL(1, 0x0) +#define EBC_CFG_PTD_DISABLEPPC_REG_VAL(1, 0x1) +#define EBC_CFG_RTC_MASK PPC_REG_VAL(4, 0x7) +#define EBC_CFG_RTC_16PERCLK PPC_REG_VAL(4, 0x0) +#define EBC_CFG_RTC_32PERCLK PPC_REG_VAL(4, 0x1) +#define EBC_CFG_RTC_64PERCLK PPC_REG_VAL(4, 0x2) +#define EBC_CFG_RTC_128PERCLK PPC_REG_VAL(4, 0x3) +#define EBC_CFG_RTC_256PERCLK PPC_REG_VAL(4, 0x4) +#define EBC_CFG_RTC_512PERCLK PPC_REG_VAL(4, 0x5) +#define EBC_CFG_RTC_1024PERCLK PPC_REG_VAL(4, 0x6) +#define EBC_CFG_RTC_2048PERCLK PPC_REG_VAL(4, 0x7) +#define EBC_CFG_ATC_MASK PPC_REG_VAL(5, 0x1) +#define EBC_CFG_ATC_HI PPC_REG_VAL(5, 0x0) +#define EBC_CFG_ATC_PREVIOUS PPC_REG_VAL(5, 0x1) +#define EBC_CFG_DTC_MASK PPC_REG_VAL(6, 0x1) +#define EBC_CFG_DTC_HI PPC_REG_VAL(6, 0x0) +#define