mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-09 20:18:54 -04:00
Merge branch 'master' of git+ssh://10.10.0.7/home/wd/git/u-boot/master
This commit is contained in:
commit
fed4de0135
@ -102,7 +102,7 @@ uchar env_get_char_spec (int index)
|
|||||||
int env_init(void)
|
int env_init(void)
|
||||||
{
|
{
|
||||||
#if defined(ENV_IS_EMBEDDED)
|
#if defined(ENV_IS_EMBEDDED)
|
||||||
ulong total;
|
size_t total;
|
||||||
int crc1_ok = 0, crc2_ok = 0;
|
int crc1_ok = 0, crc2_ok = 0;
|
||||||
env_t *tmp_env1, *tmp_env2;
|
env_t *tmp_env1, *tmp_env2;
|
||||||
|
|
||||||
@ -188,7 +188,7 @@ int saveenv(void)
|
|||||||
#else /* ! CFG_ENV_OFFSET_REDUND */
|
#else /* ! CFG_ENV_OFFSET_REDUND */
|
||||||
int saveenv(void)
|
int saveenv(void)
|
||||||
{
|
{
|
||||||
ulong total;
|
size_t total;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
puts ("Erasing Nand...");
|
puts ("Erasing Nand...");
|
||||||
@ -268,7 +268,7 @@ void env_relocate_spec (void)
|
|||||||
void env_relocate_spec (void)
|
void env_relocate_spec (void)
|
||||||
{
|
{
|
||||||
#if !defined(ENV_IS_EMBEDDED)
|
#if !defined(ENV_IS_EMBEDDED)
|
||||||
ulong total;
|
size_t total;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
total = CFG_ENV_SIZE;
|
total = CFG_ENV_SIZE;
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
PLATFORM_RELFLAGS += -ffixed-d7 -msep-data
|
PLATFORM_RELFLAGS += -ffixed-d7 -msep-data
|
||||||
ifeq ($(findstring 4.2,$(shell $(CC) --version)),4.2)
|
ifeq ($(findstring 4.2,$(shell $(CROSS_COMPILE)gcc --version)),4.2)
|
||||||
PLATFORM_CPPFLAGS += -mcpu=5208 -fPIC
|
PLATFORM_CPPFLAGS += -mcpu=5208 -fPIC
|
||||||
else
|
else
|
||||||
PLATFORM_CPPFLAGS += -m5307 -fPIC
|
PLATFORM_CPPFLAGS += -m5307 -fPIC
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
PLATFORM_RELFLAGS += -ffixed-d7 -msep-data
|
PLATFORM_RELFLAGS += -ffixed-d7 -msep-data
|
||||||
ifeq ($(findstring 4.2,$(shell $(CC) --version)),4.2)
|
ifeq ($(findstring 4.2,$(shell $(CROSS_COMPILE)gcc --version)),4.2)
|
||||||
PLATFORM_CPPFLAGS += -mcpu=5235 -fPIC
|
PLATFORM_CPPFLAGS += -mcpu=5235 -fPIC
|
||||||
else
|
else
|
||||||
PLATFORM_CPPFLAGS += -m5307 -fPIC
|
PLATFORM_CPPFLAGS += -m5307 -fPIC
|
||||||
|
@ -34,7 +34,7 @@ is5275:=$(shell grep CONFIG_M5275 $(TOPDIR)/include/$(cfg))
|
|||||||
is5282:=$(shell grep CONFIG_M5282 $(TOPDIR)/include/$(cfg))
|
is5282:=$(shell grep CONFIG_M5282 $(TOPDIR)/include/$(cfg))
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(findstring 4.2,$(shell $(CC) --version)),4.2)
|
ifeq ($(findstring 4.2,$(shell $(CROSS_COMPILE)gcc --version)),4.2)
|
||||||
|
|
||||||
ifneq (,$(findstring CONFIG_M5249,$(is5249)))
|
ifneq (,$(findstring CONFIG_M5249,$(is5249)))
|
||||||
PLATFORM_CPPFLAGS += -mcpu=5249
|
PLATFORM_CPPFLAGS += -mcpu=5249
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
PLATFORM_RELFLAGS += -ffixed-d7 -msep-data
|
PLATFORM_RELFLAGS += -ffixed-d7 -msep-data
|
||||||
ifeq ($(findstring 4.2,$(shell $(CC) --version)),4.2)
|
ifeq ($(findstring 4.2,$(shell $(CROSS_COMPILE)gcc --version)),4.2)
|
||||||
PLATFORM_CPPFLAGS += -mcpu=5329 -fPIC
|
PLATFORM_CPPFLAGS += -mcpu=5329 -fPIC
|
||||||
else
|
else
|
||||||
PLATFORM_CPPFLAGS += -m5307 -fPIC
|
PLATFORM_CPPFLAGS += -m5307 -fPIC
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
PLATFORM_RELFLAGS += -ffixed-d7 -msep-data
|
PLATFORM_RELFLAGS += -ffixed-d7 -msep-data
|
||||||
ifeq ($(findstring 4.2,$(shell $(CC) --version)),4.2)
|
ifeq ($(findstring 4.2,$(shell $(CROSS_COMPILE)gcc --version)),4.2)
|
||||||
PLATFORM_CPPFLAGS += -mcpu=54455 -fPIC
|
PLATFORM_CPPFLAGS += -mcpu=54455 -fPIC
|
||||||
else
|
else
|
||||||
PLATFORM_CPPFLAGS += -m5407 -fPIC
|
PLATFORM_CPPFLAGS += -m5407 -fPIC
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
PLATFORM_RELFLAGS += -ffixed-d7 -msep-data
|
PLATFORM_RELFLAGS += -ffixed-d7 -msep-data
|
||||||
ifeq ($(findstring 4.2,$(shell $(CC) --version)),4.2)
|
ifeq ($(findstring 4.2,$(shell $(CROSS_COMPILE)gcc --version)),4.2)
|
||||||
PLATFORM_CPPFLAGS += -mcpu=5485 -fPIC
|
PLATFORM_CPPFLAGS += -mcpu=5485 -fPIC
|
||||||
else
|
else
|
||||||
PLATFORM_CPPFLAGS += -m5407 -fPIC
|
PLATFORM_CPPFLAGS += -m5407 -fPIC
|
||||||
|
@ -105,8 +105,20 @@ int get_clocks(void)
|
|||||||
get_sys_info(&sys_info);
|
get_sys_info(&sys_info);
|
||||||
gd->cpu_clk = sys_info.freqProcessor;
|
gd->cpu_clk = sys_info.freqProcessor;
|
||||||
gd->bus_clk = sys_info.freqSystemBus;
|
gd->bus_clk = sys_info.freqSystemBus;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The base clock for I2C depends on the actual SOC. Unfortunately,
|
||||||
|
* there is no pattern that can be used to determine the frequency, so
|
||||||
|
* the only choice is to look up the actual SOC number and use the value
|
||||||
|
* for that SOC. This information is taken from application note
|
||||||
|
* AN2919.
|
||||||
|
*/
|
||||||
|
#ifdef CONFIG_MPC8610
|
||||||
gd->i2c1_clk = sys_info.freqSystemBus;
|
gd->i2c1_clk = sys_info.freqSystemBus;
|
||||||
gd->i2c2_clk = sys_info.freqSystemBus;
|
#else
|
||||||
|
gd->i2c1_clk = sys_info.freqSystemBus / 2;
|
||||||
|
#endif
|
||||||
|
gd->i2c2_clk = gd->i2c1_clk;
|
||||||
|
|
||||||
if (gd->cpu_clk != 0)
|
if (gd->cpu_clk != 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -95,7 +95,11 @@ struct fec_info_dma fec_info[] = {
|
|||||||
0, /* duplex and speed */
|
0, /* duplex and speed */
|
||||||
0, /* phy name */
|
0, /* phy name */
|
||||||
0, /* phy name init */
|
0, /* phy name init */
|
||||||
|
#ifdef CFG_DMA_USE_INTSRAM
|
||||||
|
DBUF_LENGTH, /* RX BD */
|
||||||
|
#else
|
||||||
0, /* RX BD */
|
0, /* RX BD */
|
||||||
|
#endif
|
||||||
0, /* TX BD */
|
0, /* TX BD */
|
||||||
0, /* rx Index */
|
0, /* rx Index */
|
||||||
0, /* tx Index */
|
0, /* tx Index */
|
||||||
@ -164,7 +168,8 @@ static void dbg_fec_regs(struct eth_device *dev)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void set_fec_duplex_speed(volatile fecdma_t * fecp, bd_t * bd, int dup_spd)
|
static void set_fec_duplex_speed(volatile fecdma_t * fecp, bd_t * bd,
|
||||||
|
int dup_spd)
|
||||||
{
|
{
|
||||||
if ((dup_spd >> 16) == FULL) {
|
if ((dup_spd >> 16) == FULL) {
|
||||||
/* Set maximum frame length */
|
/* Set maximum frame length */
|
||||||
@ -513,6 +518,9 @@ int mcdmafec_initialize(bd_t * bis)
|
|||||||
{
|
{
|
||||||
struct eth_device *dev;
|
struct eth_device *dev;
|
||||||
int i;
|
int i;
|
||||||
|
#ifdef CFG_DMA_USE_INTSRAM
|
||||||
|
u32 tmp = CFG_INTSRAM + 0x2000;
|
||||||
|
#endif
|
||||||
|
|
||||||
for (i = 0; i < sizeof(fec_info) / sizeof(fec_info[0]); i++) {
|
for (i = 0; i < sizeof(fec_info) / sizeof(fec_info[0]); i++) {
|
||||||
|
|
||||||
@ -533,6 +541,17 @@ int mcdmafec_initialize(bd_t * bis)
|
|||||||
dev->recv = fec_recv;
|
dev->recv = fec_recv;
|
||||||
|
|
||||||
/* setup Receive and Transmit buffer descriptor */
|
/* setup Receive and Transmit buffer descriptor */
|
||||||
|
#ifdef CFG_DMA_USE_INTSRAM
|
||||||
|
fec_info[i].rxbd = (int)fec_info[i].rxbd + tmp;
|
||||||
|
tmp = fec_info[i].rxbd;
|
||||||
|
fec_info[i].txbd =
|
||||||
|
(int)fec_info[i].txbd + tmp + (PKTBUFSRX * sizeof(cbd_t));
|
||||||
|
tmp = fec_info[i].txbd;
|
||||||
|
fec_info[i].txbuf =
|
||||||
|
(int)fec_info[i].txbuf + tmp +
|
||||||
|
(CFG_TX_ETH_BUFFER * sizeof(cbd_t));
|
||||||
|
tmp = fec_info[i].txbuf;
|
||||||
|
#else
|
||||||
fec_info[i].rxbd =
|
fec_info[i].rxbd =
|
||||||
(cbd_t *) memalign(CFG_CACHELINE_SIZE,
|
(cbd_t *) memalign(CFG_CACHELINE_SIZE,
|
||||||
(PKTBUFSRX * sizeof(cbd_t)));
|
(PKTBUFSRX * sizeof(cbd_t)));
|
||||||
@ -541,6 +560,7 @@ int mcdmafec_initialize(bd_t * bis)
|
|||||||
(CFG_TX_ETH_BUFFER * sizeof(cbd_t)));
|
(CFG_TX_ETH_BUFFER * sizeof(cbd_t)));
|
||||||
fec_info[i].txbuf =
|
fec_info[i].txbuf =
|
||||||
(char *)memalign(CFG_CACHELINE_SIZE, DBUF_LENGTH);
|
(char *)memalign(CFG_CACHELINE_SIZE, DBUF_LENGTH);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ET_DEBUG
|
#ifdef ET_DEBUG
|
||||||
printf("rxbd %x txbd %x\n",
|
printf("rxbd %x txbd %x\n",
|
||||||
|
@ -46,6 +46,10 @@ typedef struct global_data {
|
|||||||
unsigned long inp_clk;
|
unsigned long inp_clk;
|
||||||
unsigned long vco_clk;
|
unsigned long vco_clk;
|
||||||
unsigned long flb_clk;
|
unsigned long flb_clk;
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_FSL_I2C
|
||||||
|
unsigned long i2c1_clk;
|
||||||
|
unsigned long i2c2_clk;
|
||||||
#endif
|
#endif
|
||||||
unsigned long ram_size; /* RAM size */
|
unsigned long ram_size; /* RAM size */
|
||||||
unsigned long reloc_off; /* Relocation Offset */
|
unsigned long reloc_off; /* Relocation Offset */
|
||||||
|
@ -72,6 +72,7 @@
|
|||||||
# define CONFIG_MII_INIT 1
|
# define CONFIG_MII_INIT 1
|
||||||
# define CONFIG_HAS_ETH1
|
# define CONFIG_HAS_ETH1
|
||||||
|
|
||||||
|
# define CFG_DMA_USE_INTSRAM 1
|
||||||
# define CFG_DISCOVER_PHY
|
# define CFG_DISCOVER_PHY
|
||||||
# define CFG_RX_ETH_BUFFER 32
|
# define CFG_RX_ETH_BUFFER 32
|
||||||
# define CFG_TX_ETH_BUFFER 48
|
# define CFG_TX_ETH_BUFFER 48
|
||||||
|
@ -72,6 +72,7 @@
|
|||||||
# define CONFIG_MII_INIT 1
|
# define CONFIG_MII_INIT 1
|
||||||
# define CONFIG_HAS_ETH1
|
# define CONFIG_HAS_ETH1
|
||||||
|
|
||||||
|
# define CFG_DMA_USE_INTSRAM 1
|
||||||
# define CFG_DISCOVER_PHY
|
# define CFG_DISCOVER_PHY
|
||||||
# define CFG_RX_ETH_BUFFER 32
|
# define CFG_RX_ETH_BUFFER 32
|
||||||
# define CFG_TX_ETH_BUFFER 48
|
# define CFG_TX_ETH_BUFFER 48
|
||||||
|
@ -412,10 +412,10 @@ extern void print_IPaddr (IPaddr_t);
|
|||||||
* footprint in our tests.
|
* footprint in our tests.
|
||||||
*/
|
*/
|
||||||
/* return IP *in network byteorder* */
|
/* return IP *in network byteorder* */
|
||||||
static inline IPaddr_t NetReadIP(void *from)
|
static inline IPaddr_t NetReadIP(volatile void *from)
|
||||||
{
|
{
|
||||||
IPaddr_t ip;
|
IPaddr_t ip;
|
||||||
memcpy((void*)&ip, from, sizeof(ip));
|
memcpy((void*)&ip, (void*)from, sizeof(ip));
|
||||||
return ip;
|
return ip;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -434,9 +434,9 @@ static inline void NetWriteIP(void *to, IPaddr_t ip)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* copy IP */
|
/* copy IP */
|
||||||
static inline void NetCopyIP(void *to, void *from)
|
static inline void NetCopyIP(volatile void *to, void *from)
|
||||||
{
|
{
|
||||||
memcpy(to, from, sizeof(IPaddr_t));
|
memcpy((void*)to, from, sizeof(IPaddr_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* copy ulong */
|
/* copy ulong */
|
||||||
|
@ -132,17 +132,17 @@ static sysmon_table_t sysmon_table[] =
|
|||||||
|
|
||||||
{
|
{
|
||||||
"+ 5 V", "V", &sysmon_dspic, NULL, NULL,
|
"+ 5 V", "V", &sysmon_dspic, NULL, NULL,
|
||||||
100, 1000, 0, 0xFFFF, 0xFFFF,
|
100, 1000, -0x8000, 0x7FFF, 0xFFFF,
|
||||||
VOLTAGE_5V_MIN, VOLTAGE_5V_MAX, 0,
|
0x8000 + VOLTAGE_5V_MIN, 0x8000 + VOLTAGE_5V_MAX, 0,
|
||||||
VOLTAGE_5V_MIN, VOLTAGE_5V_MAX, 0,
|
0x8000 + VOLTAGE_5V_MIN, 0x8000 + VOLTAGE_5V_MAX, 0,
|
||||||
REG_VOLTAGE_5V,
|
REG_VOLTAGE_5V,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"+ 5 V standby", "V", &sysmon_dspic, NULL, NULL,
|
"+ 5 V standby", "V", &sysmon_dspic, NULL, NULL,
|
||||||
100, 1000, 0, 0xFFFF, 0xFFFF,
|
100, 1000, -0x8000, 0x7FFF, 0xFFFF,
|
||||||
VOLTAGE_5V_STANDBY_MIN, VOLTAGE_5V_STANDBY_MAX, 0,
|
0x8000 + VOLTAGE_5V_STANDBY_MIN, 0x8000 + VOLTAGE_5V_STANDBY_MAX, 0,
|
||||||
VOLTAGE_5V_STANDBY_MIN, VOLTAGE_5V_STANDBY_MAX, 0,
|
0x8000 + VOLTAGE_5V_STANDBY_MIN, 0x8000 + VOLTAGE_5V_STANDBY_MAX, 0,
|
||||||
REG_VOLTAGE_5V_STANDBY,
|
REG_VOLTAGE_5V_STANDBY,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user