[U-Boot-Users] [PATCH 5/6 ] Unified variable names and consolidated macro for MPC8349EMDS
Jiang Bo-r61859
tanya.jiang at freescale.com
Thu Aug 17 08:39:50 CEST 2006
Subject: [PATCH] Unified variable names and consolidated macro for
MPC8349EMDS
---
board/mpc8349emds/mpc8349emds.c | 10 +++++++---
board/mpc8349emds/pci.c | 18 +++++++++++-------
include/configs/MPC8349EMDS.h | 11 +++++++++++
3 files changed, 29 insertions(+), 10 deletions(-)
dac81baaa582cf3e59fd7d16ec0d3a6b0e036d6e
diff --git a/board/mpc8349emds/mpc8349emds.c
b/board/mpc8349emds/mpc8349emds.c
index b5ccb53..4e4f65d 100644
--- a/board/mpc8349emds/mpc8349emds.c
+++ b/board/mpc8349emds/mpc8349emds.c
@@ -5,6 +5,10 @@
* See file CREDITS for list of people who contributed to this
* project.
*
+ * History :
+ * 20060601 Daveliu (daveliu at freescale.com)
+ * Unified variable names with mpc83xx
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
@@ -168,7 +172,7 @@ #if defined(CFG_BR2_PRELIM) \
void sdram_init(void)
{
volatile immap_t *immap = (immap_t *)CFG_IMMRBAR;
- volatile lbus8349_t *lbc= &immap->lbus;
+ volatile lbus83xx_t *lbc= &immap->lbus;
uint *sdram_addr = (uint *)CFG_LBC_SDRAM_BASE;
puts("\n SDRAM on Local Bus: ");
@@ -246,7 +250,7 @@ #if defined(CONFIG_DDR_ECC) && defined(C
void ecc_print_status(void)
{
volatile immap_t *immap = (immap_t *)CFG_IMMRBAR;
- volatile ddr8349_t *ddr = &immap->ddr;
+ volatile ddr83xx_t *ddr = &immap->ddr;
printf("\nECC mode: %s\n\n", (ddr->sdram_cfg & SDRAM_CFG_ECC_EN)
? "ON" : "OFF");
@@ -321,7 +325,7 @@ void ecc_print_status(void)
int do_ecc ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
volatile immap_t *immap = (immap_t *)CFG_IMMRBAR;
- volatile ddr8349_t *ddr = &immap->ddr;
+ volatile ddr83xx_t *ddr = &immap->ddr;
volatile u32 val;
u64 *addr, count, val64;
register u64 *i;
diff --git a/board/mpc8349emds/pci.c b/board/mpc8349emds/pci.c
index 63e4405..d98203b 100644
--- a/board/mpc8349emds/pci.c
+++ b/board/mpc8349emds/pci.c
@@ -2,6 +2,10 @@
* See file CREDITS for list of people who contributed to this
* project.
*
+ * History:
+ * 20060601 Daveliu (daveliu at freescale.com)
+ * Unified variable names with mpc83xx
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
@@ -72,7 +76,7 @@ pib_init(void)
/*
* Assign PIB PMC slot to desired PCI bus
*/
- mpc8349_i2c = (i2c_t*)(CFG_IMMRBAR + CFG_I2C2_OFFSET);
+ mpc83xx_i2c = (i2c_t*)(CFG_IMMRBAR + CFG_I2C2_OFFSET);
i2c_init(CFG_I2C_SPEED, CFG_I2C_SLAVE);
val8 = 0;
@@ -130,18 +134,18 @@ void
pci_init_board(void)
{
volatile immap_t * immr;
- volatile clk8349_t * clk;
- volatile law8349_t * pci_law;
- volatile pot8349_t * pci_pot;
- volatile pcictrl8349_t * pci_ctrl;
- volatile pciconf8349_t * pci_conf;
+ volatile clk83xx_t * clk;
+ volatile law83xx_t * pci_law;
+ volatile pot83xx_t * pci_pot;
+ volatile pcictrl83xx_t * pci_ctrl;
+ volatile pciconf83xx_t * pci_conf;
u16 reg16;
u32 reg32;
u32 dev;
struct pci_controller * hose;
immr = (immap_t *)CFG_IMMRBAR;
- clk = (clk8349_t *)&immr->clk;
+ clk = (clk83xx_t *)&immr->clk;
pci_law = immr->sysconf.pcilaw;
pci_pot = immr->ios.pot;
pci_ctrl = immr->pci_ctrl;
diff --git a/include/configs/MPC8349EMDS.h
b/include/configs/MPC8349EMDS.h
index 66f1646..b860401 100644
--- a/include/configs/MPC8349EMDS.h
+++ b/include/configs/MPC8349EMDS.h
@@ -59,6 +59,17 @@ #define HRCWL_CSB_TO_CLKIN HRCWL_CSB_TO_
#endif
#endif
+#define CFG_SCCR_INIT (SCCR_DEFAULT & (~SCCR_CLK_MASK))
+#define CFG_SCCR_TSEC1CM SCCR_TSEC1CM_1 /* TSEC1 clock setting
*/
+#define CFG_SCCR_TSEC2CM SCCR_TSEC2CM_1 /* TSEC2 clock setting
*/
+#define CFG_SCCR_ENCCM SCCR_ENCCM_3 /* ENC clock setting */
+#define CFG_SCCR_USBCM SCCR_USBCM_3 /* USB clock setting */
+#define CFG_SCCR_VAL ( CFG_SCCR_INIT \
+ | CFG_SCCR_TSEC1CM \
+ | CFG_SCCR_TSEC2CM \
+ | CFG_SCCR_ENCCM \
+ | CFG_SCCR_USBCM )
+
#define CONFIG_BOARD_EARLY_INIT_F /* call board_pre_init
*/
#define CFG_IMMRBAR 0xE0000000
--
1.3.GIT
More information about the U-Boot
mailing list