mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
Compare commits
5 Commits
LABEL_2004
...
U-Boot-1_1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
08f1080c9c | ||
|
|
fc1cfcdb12 | ||
|
|
0b8fa03b6d | ||
|
|
b9711de102 | ||
|
|
e9132ea94c |
29
CHANGELOG
29
CHANGELOG
@@ -2,6 +2,35 @@
|
||||
Changes for U-Boot 1.1.1:
|
||||
======================================================================
|
||||
|
||||
* Patch by Travis Sawyer, 23 Apr 2004:
|
||||
Fix VSC/CIS 8201 phy descrambler interoperability timing due to
|
||||
errata from Vitesse Semiconductor.
|
||||
|
||||
* Patch by Philippe Robin, 22 Apr 2004:
|
||||
Fix ethernet configuration for "versatile" board
|
||||
|
||||
* Patch by Kshitij Gupta, 21 Apr 2004:
|
||||
Remove busy loop and use MPU timer fr usleep() on OMAP1510/1610 boards
|
||||
|
||||
* Patch by Steven Scholz, 24 Feb 2004:
|
||||
Fix a bug in AT91RM9200 ethernet driver:
|
||||
The MII interface is now initialized before accessing the PHY.
|
||||
|
||||
* Patch by John Kerl, 19 Apr 2004:
|
||||
Use U-boot's miiphy.h for PHY register names, rather than
|
||||
introducing a new header file.
|
||||
|
||||
* Update pci_ids.h from linux-2.4.26
|
||||
|
||||
* Patch by Masami Komiya, 19 Apr 2004:
|
||||
Fix problem cause by VLAN function on little endian architecture
|
||||
without VLAN environment
|
||||
|
||||
* Clean up the TQM8xx_YYMHz configurations; allow to use the same
|
||||
binary image for all clock frequencies. Implement run-time
|
||||
optimization of flash access timing based on the actual bus
|
||||
frequency.
|
||||
|
||||
* Modify KUP4X board configuration to use SL811 driver for USB memory
|
||||
sticks (including FAT / VFAT filesystem support)
|
||||
|
||||
|
||||
46
Makefile
46
Makefile
@@ -486,66 +486,26 @@ TOP860_config: unconfig
|
||||
@./mkconfig $(@:_config=) ppc mpc8xx top860 emk
|
||||
|
||||
# Play some tricks for configuration selection
|
||||
# All boards can come with 50 MHz (default), 66MHz, 80MHz or 100 MHz clock,
|
||||
# but only 855 and 860 boards may come with FEC
|
||||
# and 823 boards may have LCD support
|
||||
xtract_8xx = $(subst _66MHz,,$(subst _80MHz,,$(subst _100MHz,,$(subst _133MHz,,$(subst _LCD,,$(subst _config,,$1))))))
|
||||
# Only 855 and 860 boards may come with FEC
|
||||
# and only 823 boards may have LCD support
|
||||
xtract_8xx = $(subst _LCD,,$(subst _config,,$1))
|
||||
|
||||
FPS850L_config \
|
||||
FPS860L_config \
|
||||
NSCU_config \
|
||||
TQM823L_config \
|
||||
TQM823L_66MHz_config \
|
||||
TQM823L_80MHz_config \
|
||||
TQM823L_LCD_config \
|
||||
TQM823L_LCD_66MHz_config \
|
||||
TQM823L_LCD_80MHz_config \
|
||||
TQM850L_config \
|
||||
TQM850L_66MHz_config \
|
||||
TQM850L_80MHz_config \
|
||||
TQM855L_config \
|
||||
TQM855L_66MHz_config \
|
||||
TQM855L_80MHz_config \
|
||||
TQM860L_config \
|
||||
TQM860L_66MHz_config \
|
||||
TQM860L_80MHz_config \
|
||||
TQM862L_config \
|
||||
TQM862L_66MHz_config \
|
||||
TQM862L_80MHz_config \
|
||||
TQM823M_config \
|
||||
TQM823M_66MHz_config \
|
||||
TQM823M_80MHz_config \
|
||||
TQM850M_config \
|
||||
TQM850M_66MHz_config \
|
||||
TQM850M_80MHz_config \
|
||||
TQM855M_config \
|
||||
TQM855M_66MHz_config \
|
||||
TQM855M_80MHz_config \
|
||||
TQM860M_config \
|
||||
TQM860M_66MHz_config \
|
||||
TQM860M_80MHz_config \
|
||||
TQM862M_config \
|
||||
TQM862M_66MHz_config \
|
||||
TQM862M_80MHz_config \
|
||||
TQM862M_100MHz_config \
|
||||
TQM866M_config: unconfig
|
||||
@ >include/config.h
|
||||
@[ -z "$(findstring _66MHz,$@)" ] || \
|
||||
{ echo "#define CONFIG_66MHz" >>include/config.h ; \
|
||||
echo "... with 66MHz system clock" ; \
|
||||
}
|
||||
@[ -z "$(findstring _80MHz,$@)" ] || \
|
||||
{ echo "#define CONFIG_80MHz" >>include/config.h ; \
|
||||
echo "... with 80MHz system clock" ; \
|
||||
}
|
||||
@[ -z "$(findstring _100MHz,$@)" ] || \
|
||||
{ echo "#define CONFIG_100MHz" >>include/config.h ; \
|
||||
echo "... with 100MHz system clock" ; \
|
||||
}
|
||||
@[ -z "$(findstring _133MHz,$@)" ] || \
|
||||
{ echo "#define CONFIG_133MHz" >>include/config.h ; \
|
||||
echo "... with 133MHz system clock" ; \
|
||||
}
|
||||
@[ -z "$(findstring _LCD,$@)" ] || \
|
||||
{ echo "#define CONFIG_LCD" >>include/config.h ; \
|
||||
echo "#define CONFIG_NEC_NL6448BC20" >>include/config.h ; \
|
||||
|
||||
@@ -54,19 +54,17 @@ static void flash_get_offsets (ulong base, flash_info_t * info);
|
||||
unsigned long flash_init (void)
|
||||
{
|
||||
unsigned long size_b0;
|
||||
unsigned long base_b0;
|
||||
|
||||
/* Init: no FLASHes known */
|
||||
flash_info[0].flash_id = FLASH_UNKNOWN;
|
||||
|
||||
/* Static FLASH Bank configuration here - FIXME XXX */
|
||||
|
||||
size_b0 =
|
||||
flash_get_size ((vu_long *) FLASH_BASE0_PRELIM,
|
||||
&flash_info[0]);
|
||||
size_b0 = flash_get_size ((vu_long *) FLASH_BASE0_PRELIM, &flash_info[0]);
|
||||
|
||||
if (flash_info[0].flash_id == FLASH_UNKNOWN) {
|
||||
printf ("## Unknown FLASH on Bank 0 - Size = 0x%08lx = %ld MB\n", size_b0, size_b0 << 20);
|
||||
printf ("## Unknown FLASH on Bank 0 - Size = 0x%08lx = %ld MB\n",
|
||||
size_b0, size_b0 << 20);
|
||||
}
|
||||
|
||||
/* Only one bank */
|
||||
@@ -212,15 +210,10 @@ void flash_print_info (flash_info_t * info)
|
||||
|
||||
if ((i % 5) == 0)
|
||||
printf ("\n ");
|
||||
#if 0 /* test-only */
|
||||
printf (" %08lX%s",
|
||||
info->start[i], info->protect[i] ? " (RO)" : " "
|
||||
#else
|
||||
printf (" %08lX%s%s",
|
||||
info->start[i],
|
||||
erased ? " E" : " ", info->protect[i] ? "RO " : " "
|
||||
#endif
|
||||
);
|
||||
);
|
||||
}
|
||||
printf ("\n");
|
||||
return;
|
||||
@@ -248,11 +241,7 @@ static ulong flash_get_size (vu_long * addr, flash_info_t * info)
|
||||
addr2[ADDR1] = (FLASH_WORD_SIZE) 0x00550055;
|
||||
addr2[ADDR0] = (FLASH_WORD_SIZE) 0x00900090;
|
||||
|
||||
#ifdef CONFIG_ADCIOP
|
||||
value = addr2[2];
|
||||
#else
|
||||
value = addr2[0];
|
||||
#endif
|
||||
|
||||
switch (value) {
|
||||
case (FLASH_WORD_SIZE) AMD_MANUFACT:
|
||||
@@ -271,12 +260,7 @@ static ulong flash_get_size (vu_long * addr, flash_info_t * info)
|
||||
return (0); /* no or unknown flash */
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ADCIOP
|
||||
value = addr2[0]; /* device ID */
|
||||
/* printf("\ndev_code=%x\n", value); */
|
||||
#else
|
||||
value = addr2[1]; /* device ID */
|
||||
#endif
|
||||
|
||||
switch (value) {
|
||||
case (FLASH_WORD_SIZE) AMD_ID_F040B:
|
||||
@@ -387,36 +371,19 @@ static ulong flash_get_size (vu_long * addr, flash_info_t * info)
|
||||
for (i = 0; i < info->sector_count; i++) {
|
||||
/* read sector protection at sector address, (A7 .. A0) = 0x02 */
|
||||
/* D0 = 1 if protected */
|
||||
#ifdef CONFIG_ADCIOP
|
||||
addr2 = (volatile FLASH_WORD_SIZE *) (info->start[i]);
|
||||
info->protect[i] = addr2[4] & 1;
|
||||
#else
|
||||
addr2 = (volatile FLASH_WORD_SIZE *) (info->start[i]);
|
||||
if ((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_SST)
|
||||
info->protect[i] = 0;
|
||||
else
|
||||
info->protect[i] = addr2[2] & 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Prevent writes to uninitialized FLASH.
|
||||
*/
|
||||
if (info->flash_id != FLASH_UNKNOWN) {
|
||||
#if 0 /* test-only */
|
||||
#ifdef CONFIG_ADCIOP
|
||||
addr2 = (volatile unsigned char *) info->start[0];
|
||||
addr2[ADDR0] = 0xAA;
|
||||
addr2[ADDR1] = 0x55;
|
||||
addr2[ADDR0] = 0xF0; /* reset bank */
|
||||
#else
|
||||
addr2 = (FLASH_WORD_SIZE *) info->start[0];
|
||||
*addr2 = (FLASH_WORD_SIZE) 0x00F000F0; /* reset bank */
|
||||
#endif
|
||||
#else /* test-only */
|
||||
addr2 = (FLASH_WORD_SIZE *) info->start[0];
|
||||
*addr2 = (FLASH_WORD_SIZE) 0x00F000F0; /* reset bank */
|
||||
#endif /* test-only */
|
||||
}
|
||||
|
||||
return (info->size);
|
||||
|
||||
@@ -195,7 +195,6 @@ const iop_conf_t iop_conf_tab[4][32] = {
|
||||
}
|
||||
};
|
||||
|
||||
static uint64_t blinky_increment;
|
||||
static uint64_t next_led_update;
|
||||
static uint led_bit;
|
||||
|
||||
|
||||
@@ -29,6 +29,15 @@
|
||||
#include <mpc8xx.h>
|
||||
#include <environment.h>
|
||||
|
||||
#include <asm/processor.h>
|
||||
|
||||
#if defined(CONFIG_TQM8xxL) && !defined(CONFIG_TQM866M)
|
||||
# ifndef CFG_OR_TIMING_FLASH_AT_50MHZ
|
||||
# define CFG_OR_TIMING_FLASH_AT_50MHZ (OR_ACS_DIV1 | OR_TRLX | OR_CSNT_SAM | \
|
||||
OR_SCY_2_CLK | OR_EHTR | OR_BI)
|
||||
# endif
|
||||
#endif /* CONFIG_TQM8xxL/M, !TQM866M */
|
||||
|
||||
#ifndef CFG_ENV_ADDR
|
||||
#define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_ENV_OFFSET)
|
||||
#endif
|
||||
@@ -51,6 +60,50 @@ unsigned long flash_init (void)
|
||||
unsigned long size_b0, size_b1;
|
||||
int i;
|
||||
|
||||
#ifdef CFG_OR_TIMING_FLASH_AT_50MHZ
|
||||
int scy, trlx, flash_or_timing, clk_diff;
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
scy = (CFG_OR_TIMING_FLASH_AT_50MHZ & OR_SCY_MSK) >> 4;
|
||||
if (CFG_OR_TIMING_FLASH_AT_50MHZ & OR_TRLX) {
|
||||
trlx = OR_TRLX;
|
||||
scy *= 2;
|
||||
} else
|
||||
trlx = 0;
|
||||
|
||||
/* We assume that each 10MHz of bus clock require 1-clk SCY
|
||||
* adjustment.
|
||||
*/
|
||||
clk_diff = (gd->bus_clk / 1000000) - 50;
|
||||
|
||||
/* We need proper rounding here. This is what the "+5" and "-5"
|
||||
* are here for.
|
||||
*/
|
||||
if (clk_diff >= 0)
|
||||
scy += (clk_diff + 5) / 10;
|
||||
else
|
||||
scy += (clk_diff - 5) / 10;
|
||||
|
||||
/* For bus frequencies above 50MHz, we want to use relaxed timing
|
||||
* (OR_TRLX).
|
||||
*/
|
||||
if (gd->bus_clk >= 50000000)
|
||||
trlx = OR_TRLX;
|
||||
else
|
||||
trlx = 0;
|
||||
|
||||
if (trlx)
|
||||
scy /= 2;
|
||||
|
||||
if (scy > 0xf)
|
||||
scy = 0xf;
|
||||
if (scy < 1)
|
||||
scy = 1;
|
||||
|
||||
flash_or_timing = (scy << 4) | trlx |
|
||||
(CFG_OR_TIMING_FLASH_AT_50MHZ & ~(OR_TRLX | OR_SCY_MSK));
|
||||
#endif
|
||||
/* Init: no FLASHes known */
|
||||
for (i=0; i<CFG_MAX_FLASH_BANKS; ++i) {
|
||||
flash_info[i].flash_id = FLASH_UNKNOWN;
|
||||
@@ -95,7 +148,11 @@ unsigned long flash_init (void)
|
||||
memctl->memc_br1, memctl->memc_or1);
|
||||
|
||||
/* Remap FLASH according to real size */
|
||||
#ifndef CFG_OR_TIMING_FLASH_AT_50MHZ
|
||||
memctl->memc_or0 = CFG_OR_TIMING_FLASH | (-size_b0 & OR_AM_MSK);
|
||||
#else
|
||||
memctl->memc_or0 = flash_or_timing | (-size_b0 & OR_AM_MSK);
|
||||
#endif
|
||||
memctl->memc_br0 = (CFG_FLASH_BASE & BR_BA_MSK) | BR_MS_GPCM | BR_V;
|
||||
|
||||
debug ("## BR0: 0x%08x OR0: 0x%08x\n",
|
||||
@@ -146,7 +203,11 @@ unsigned long flash_init (void)
|
||||
#endif
|
||||
|
||||
if (size_b1) {
|
||||
#ifndef CFG_OR_TIMING_FLASH_AT_50MHZ
|
||||
memctl->memc_or1 = CFG_OR_TIMING_FLASH | (-size_b1 & 0xFFFF8000);
|
||||
#else
|
||||
memctl->memc_or1 = flash_or_timing | (-size_b1 & 0xFFFF8000);
|
||||
#endif
|
||||
memctl->memc_br1 = ((CFG_FLASH_BASE + size_b0) & BR_BA_MSK) |
|
||||
BR_MS_GPCM | BR_V;
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ static unsigned ace_readw(unsigned offset)
|
||||
return readw(CFG_SYSTEMACE_BASE+offset);
|
||||
}
|
||||
|
||||
static unsigned ace_writew(unsigned val, unsigned offset)
|
||||
static void ace_writew(unsigned val, unsigned offset)
|
||||
{
|
||||
writew(val, CFG_SYSTEMACE_BASE+offset);
|
||||
}
|
||||
@@ -119,7 +119,6 @@ static unsigned long systemace_read(int dev,
|
||||
unsigned long blkcnt,
|
||||
unsigned long *buffer)
|
||||
{
|
||||
unsigned val;
|
||||
int retry;
|
||||
unsigned blk_countdown;
|
||||
unsigned char*dp = (unsigned char*)buffer;
|
||||
@@ -218,4 +217,4 @@ static unsigned long systemace_read(int dev,
|
||||
|
||||
return blkcnt;
|
||||
}
|
||||
#endif
|
||||
#endif /* CONFIG_SYSTEMACE */
|
||||
|
||||
@@ -31,8 +31,6 @@
|
||||
#if (CONFIG_COMMANDS & CFG_CMD_MII)
|
||||
#include <miiphy.h>
|
||||
|
||||
#define CONFIG_TERSE_MII /* XXX necessary here because "miivals.h" is missing */
|
||||
|
||||
#ifdef CONFIG_TERSE_MII
|
||||
/*
|
||||
* Display values from last command.
|
||||
@@ -149,8 +147,6 @@ U_BOOT_CMD(
|
||||
|
||||
#else /* ! CONFIG_TERSE_MII ================================================= */
|
||||
|
||||
#include <miivals.h>
|
||||
|
||||
typedef struct _MII_reg_desc_t {
|
||||
ushort regno;
|
||||
char * name;
|
||||
@@ -343,14 +339,14 @@ static int special_field(
|
||||
ushort regval)
|
||||
{
|
||||
if ((regno == 0) && (pdesc->lo == 6)) {
|
||||
ushort speed_bits = regval & MII_CTL_SPEED_MASK;
|
||||
ushort speed_bits = regval & PHY_BMCR_SPEED_MASK;
|
||||
printf("%2u,%2u = b%u%u speed selection = %s Mbps",
|
||||
6, 13,
|
||||
(regval >> 6) & 1,
|
||||
(regval >> 13) & 1,
|
||||
speed_bits == MII_CTL_SPEED_1000_MBPS ? "1000" :
|
||||
speed_bits == MII_CTL_SPEED_100_MBPS ? "100" :
|
||||
speed_bits == MII_CTL_SPEED_10_MBPS ? "10" :
|
||||
speed_bits == PHY_BMCR_1000_MBPS ? "1000" :
|
||||
speed_bits == PHY_BMCR_100_MBPS ? "100" :
|
||||
speed_bits == PHY_BMCR_10_MBPS ? "10" :
|
||||
"???");
|
||||
return 1;
|
||||
}
|
||||
@@ -367,9 +363,9 @@ static int special_field(
|
||||
ushort sel_bits = (regval >> pdesc->lo) & pdesc->mask;
|
||||
printf("%2u-%2u = %5u selector = %s",
|
||||
pdesc->hi, pdesc->lo, sel_bits,
|
||||
sel_bits == MII_AN_ADV_IEEE_802_3 ?
|
||||
sel_bits == PHY_ANLPAR_PSB_802_3 ?
|
||||
"IEEE 802.3" :
|
||||
sel_bits == MII_AN_ADV_IEEE_802_9_ISLAN_16T ?
|
||||
sel_bits == PHY_ANLPAR_PSB_802_9 ?
|
||||
"IEEE 802.9 ISLAN-16T" :
|
||||
"???");
|
||||
return 1;
|
||||
@@ -379,9 +375,9 @@ static int special_field(
|
||||
ushort sel_bits = (regval >> pdesc->lo) & pdesc->mask;
|
||||
printf("%2u-%2u = %u selector = %s",
|
||||
pdesc->hi, pdesc->lo, sel_bits,
|
||||
sel_bits == MII_AN_PARTNER_IEEE_802_3 ?
|
||||
sel_bits == PHY_ANLPAR_PSB_802_3 ?
|
||||
"IEEE 802.3" :
|
||||
sel_bits == MII_AN_PARTNER_IEEE_802_9_ISLAN_16T ?
|
||||
sel_bits == PHY_ANLPAR_PSB_802_9 ?
|
||||
"IEEE 802.9 ISLAN-16T" :
|
||||
"???");
|
||||
return 1;
|
||||
@@ -418,7 +414,7 @@ int do_mii (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
|
||||
{
|
||||
char op;
|
||||
unsigned char addrlo, addrhi, reglo, reghi;
|
||||
unsigned char addr, reg;
|
||||
unsigned char addr = 0, reg = 0;
|
||||
unsigned short data;
|
||||
int rcode = 0;
|
||||
|
||||
|
||||
@@ -215,16 +215,9 @@ void set_timer (ulong t)
|
||||
timestamp = t;
|
||||
}
|
||||
|
||||
/* delay x useconds AND perserve advance timstamp value */
|
||||
/* delay x useconds AND preserve advance timestamp value */
|
||||
void udelay (unsigned long usec)
|
||||
{
|
||||
#ifdef CONFIG_INNOVATOROMAP1510
|
||||
#define LOOPS_PER_MSEC 60 /* tuned on omap1510 */
|
||||
volatile int i, time_remaining = LOOPS_PER_MSEC * usec;
|
||||
|
||||
for (i = time_remaining; i > 0; i--) {
|
||||
}
|
||||
#else
|
||||
ulong tmo, tmp;
|
||||
|
||||
if(usec >= 1000){ /* if "big" number, spread normalization to seconds */
|
||||
@@ -242,9 +235,8 @@ void udelay (unsigned long usec)
|
||||
else
|
||||
tmo += tmp; /* else, set advancing stamp wake up time */
|
||||
|
||||
while (get_timer_masked () < tmo)/* loop till event */
|
||||
while (get_timer_masked () < tmo) /* loop till event */
|
||||
/*NOP*/;
|
||||
#endif
|
||||
}
|
||||
|
||||
void reset_timer_masked (void)
|
||||
|
||||
@@ -378,14 +378,21 @@ int eth_init (bd_t * bd)
|
||||
|
||||
p_mac = AT91C_BASE_EMAC;
|
||||
|
||||
*AT91C_PIOA_PDR = AT91C_PA16_EMDIO | AT91C_PA15_EMDC | AT91C_PA14_ERXER | AT91C_PA13_ERX1 | AT91C_PA12_ERX0 | AT91C_PA11_ECRS_ECRSDV | AT91C_PA10_ETX1 | AT91C_PA9_ETX0 | AT91C_PA8_ETXEN | AT91C_PA7_ETXCK_EREFCK; /* PIO Disable Register */
|
||||
/* PIO Disable Register */
|
||||
*AT91C_PIOA_PDR = AT91C_PA16_EMDIO | AT91C_PA15_EMDC | AT91C_PA14_ERXER |
|
||||
AT91C_PA13_ERX1 | AT91C_PA12_ERX0 | AT91C_PA11_ECRS_ECRSDV |
|
||||
AT91C_PA10_ETX1 | AT91C_PA9_ETX0 | AT91C_PA8_ETXEN |
|
||||
AT91C_PA7_ETXCK_EREFCK;
|
||||
|
||||
*AT91C_PIOB_PDR = AT91C_PB25_EF100 |
|
||||
AT91C_PB19_ERXCK | AT91C_PB18_ECOL | AT91C_PB17_ERXDV |
|
||||
AT91C_PB16_ERX3 | AT91C_PB15_ERX2 | AT91C_PB14_ETXER |
|
||||
AT91C_PB13_ETX3 | AT91C_PB12_ETX2;
|
||||
AT91C_PB19_ERXCK | AT91C_PB18_ECOL | AT91C_PB17_ERXDV |
|
||||
AT91C_PB16_ERX3 | AT91C_PB15_ERX2 | AT91C_PB14_ETXER |
|
||||
AT91C_PB13_ETX3 | AT91C_PB12_ETX2;
|
||||
|
||||
*AT91C_PIOB_BSR = AT91C_PB25_EF100 | AT91C_PB19_ERXCK | AT91C_PB18_ECOL | AT91C_PB17_ERXDV | AT91C_PB16_ERX3 | AT91C_PB15_ERX2 | AT91C_PB14_ETXER | AT91C_PB13_ETX3 | AT91C_PB12_ETX2; /* Select B Register */
|
||||
/* Select B Register */
|
||||
*AT91C_PIOB_BSR = AT91C_PB25_EF100 | AT91C_PB19_ERXCK | AT91C_PB18_ECOL |
|
||||
AT91C_PB17_ERXDV | AT91C_PB16_ERX3 | AT91C_PB15_ERX2 |
|
||||
AT91C_PB14_ETXER | AT91C_PB13_ETX3 | AT91C_PB12_ETX2;
|
||||
|
||||
*AT91C_PMC_PCER = 1 << AT91C_ID_EMAC; /* Peripheral Clock Enable Register */
|
||||
|
||||
@@ -400,6 +407,22 @@ int eth_init (bd_t * bd)
|
||||
rbfdt[RBF_FRAMEMAX - 1].addr |= RBF_WRAP;
|
||||
rbfp = &rbfdt[0];
|
||||
|
||||
p_mac->EMAC_SA2L = (bd->bi_enetaddr[3] << 24) | (bd->bi_enetaddr[2] << 16)
|
||||
| (bd->bi_enetaddr[1] << 8) | (bd->bi_enetaddr[0]);
|
||||
p_mac->EMAC_SA2H = (bd->bi_enetaddr[5] << 8) | (bd->bi_enetaddr[4]);
|
||||
|
||||
p_mac->EMAC_RBQP = (long) (&rbfdt[0]);
|
||||
p_mac->EMAC_RSR &= ~(AT91C_EMAC_RSR_OVR | AT91C_EMAC_REC | AT91C_EMAC_BNA);
|
||||
|
||||
p_mac->EMAC_CFG = (p_mac->EMAC_CFG | AT91C_EMAC_CAF | AT91C_EMAC_NBC)
|
||||
& ~AT91C_EMAC_CLK;
|
||||
|
||||
#ifdef CONFIG_AT91C_USE_RMII
|
||||
p_mac->EMAC_CFG |= AT91C_EMAC_RMII;
|
||||
#endif
|
||||
|
||||
p_mac->EMAC_CTL |= AT91C_EMAC_TE | AT91C_EMAC_RE;
|
||||
|
||||
at91rm92000_GetPhyInterface ();
|
||||
|
||||
if (!pPhyOps->IsPhyConnected (p_mac))
|
||||
@@ -416,22 +439,6 @@ int eth_init (bd_t * bd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
p_mac->EMAC_SA2L = (bd->bi_enetaddr[3] << 24) | (bd->bi_enetaddr[2] << 16)
|
||||
| (bd->bi_enetaddr[1] << 8) | (bd->bi_enetaddr[0]);
|
||||
p_mac->EMAC_SA2H = (bd->bi_enetaddr[5] << 8) | (bd->bi_enetaddr[4]);
|
||||
|
||||
p_mac->EMAC_RBQP = (long) (&rbfdt[0]);
|
||||
p_mac->EMAC_RSR &= ~(AT91C_EMAC_RSR_OVR | AT91C_EMAC_REC | AT91C_EMAC_BNA);
|
||||
|
||||
p_mac->EMAC_CFG = (p_mac->EMAC_CFG | AT91C_EMAC_CAF | AT91C_EMAC_NBC)
|
||||
& ~AT91C_EMAC_CLK;
|
||||
|
||||
#ifdef CONFIG_AT91C_USE_RMII
|
||||
p_mac->EMAC_CFG |= AT91C_EMAC_RMII;
|
||||
#endif
|
||||
|
||||
p_mac->EMAC_CTL |= AT91C_EMAC_TE | AT91C_EMAC_RE;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -347,4 +347,32 @@ static long init_pll_866 (long clk)
|
||||
|
||||
#endif /* CONFIG_MPC866_et_al */
|
||||
|
||||
#if defined(CONFIG_TQM8xxL) && !defined(CONFIG_TQM866M)
|
||||
/*
|
||||
* Adjust sdram refresh rate to actual CPU clock
|
||||
* and set timebase source according to actual CPU clock
|
||||
*/
|
||||
int adjust_sdram_tbs_8xx (void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
volatile immap_t *immr = (immap_t *) CFG_IMMR;
|
||||
long mamr;
|
||||
long sccr;
|
||||
|
||||
mamr = immr->im_memctl.memc_mamr;
|
||||
mamr &= ~MAMR_PTA_MSK;
|
||||
mamr |= ((gd->cpu_clk / CFG_PTA_PER_CLK) << MAMR_PTA_SHIFT);
|
||||
immr->im_memctl.memc_mamr = mamr;
|
||||
|
||||
if (gd->cpu_clk < 67000000) {
|
||||
sccr = immr->im_clkrst.car_sccr;
|
||||
sccr |= SCCR_TBS;
|
||||
immr->im_clkrst.car_sccr = sccr;
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
#endif /* CONFIG_TQM8xxL/M, !TQM866M */
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
@@ -437,6 +437,22 @@ static int ppc_440x_eth_init (struct eth_device *dev, bd_t * bis)
|
||||
*/
|
||||
if ( ((devnum == 2) || (devnum ==3)) && (4 == ethgroup) ) {
|
||||
miiphy_write (reg, 23, 0x1200);
|
||||
/*
|
||||
* Vitesse VSC8201/Cicada CIS8201 errata:
|
||||
* Interoperability problem with Intel 82547EI phys
|
||||
* This work around (provided by Vitesse) changes
|
||||
* the default timer convergence from 8ms to 12ms
|
||||
*/
|
||||
miiphy_write (reg, 0x1f, 0x2a30);
|
||||
miiphy_write (reg, 0x08, 0x0200);
|
||||
miiphy_write (reg, 0x1f, 0x52b5);
|
||||
miiphy_write (reg, 0x02, 0x0004);
|
||||
miiphy_write (reg, 0x01, 0x0671);
|
||||
miiphy_write (reg, 0x00, 0x8fae);
|
||||
miiphy_write (reg, 0x1f, 0x2a30);
|
||||
miiphy_write (reg, 0x08, 0x0000);
|
||||
miiphy_write (reg, 0x1f, 0x0000);
|
||||
/* end Vitesse/Cicada errata */
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -917,7 +933,7 @@ int enetInt (struct eth_device *dev)
|
||||
mtdcr (uic0sr, UIC_MTE);
|
||||
}
|
||||
/* handle MAL RX EOB interupt from a receive */
|
||||
/* check for EOB on valid channels */
|
||||
/* check for EOB on valid channels */
|
||||
if (my_uic0msr & UIC_MRE) {
|
||||
mal_rx_eob = mfdcr (malrxeobisr);
|
||||
if ((mal_rx_eob & (0x80000000 >> hw_p->devnum)) != 0) { /* call emac routine for channel x */
|
||||
@@ -1033,9 +1049,9 @@ static void enet_rcv (struct eth_device *dev, unsigned long malisr)
|
||||
MAX_ERR_LOG)
|
||||
hw_p->rx_err_index =
|
||||
0;
|
||||
} /* emac_erros */
|
||||
} /* emac_erros */
|
||||
} /* data_len < max mtu */
|
||||
} /* if data_len */
|
||||
} /* if data_len */
|
||||
if (!data_len) { /* no data */
|
||||
hw_p->rx[i].ctrl |= MAL_RX_CTRL_EMPTY; /* Free Recv Buffer */
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@ static int ns8382x_poll(struct eth_device *dev);
|
||||
static void ns8382x_disable(struct eth_device *dev);
|
||||
|
||||
static struct pci_device_id supported[] = {
|
||||
{PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_8382x},
|
||||
{PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_83820},
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
@@ -494,7 +494,7 @@ static struct proc_dir_entry *pSkRootDir;
|
||||
static struct pci_device_id supported[] = {
|
||||
{PCI_VENDOR_ID_3COM, 0x1700},
|
||||
{PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_GE},
|
||||
{PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_GE_SA},
|
||||
{PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_YU},
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
@@ -372,6 +372,7 @@ int serial_tstc (void);
|
||||
int get_clocks (void);
|
||||
int get_clocks_866 (void);
|
||||
int sdram_adjust_866 (void);
|
||||
int adjust_sdram_tbs_8xx (void);
|
||||
#if defined(CONFIG_8260)
|
||||
int prt_8260_clks (void);
|
||||
#endif
|
||||
|
||||
@@ -262,15 +262,8 @@
|
||||
*-----------------------------------------------------------------------
|
||||
* Reset PLL lock status sticky bit, timer expired status bit and timer
|
||||
* interrupt status bit
|
||||
*
|
||||
* If this is a 80 MHz CPU, set PLL multiplication factor to 5 (5*16=80)!
|
||||
*/
|
||||
#ifdef CONFIG_80MHz /* for 80 MHz, we use a 16 MHz clock * 5 */
|
||||
#define CFG_PLPRCR \
|
||||
( (5-1)<<PLPRCR_MF_SHIFT | PLPRCR_TEXPS | PLPRCR_TMIST )
|
||||
#else /* up to 66 MHz we use a 1:1 clock */
|
||||
#define CFG_PLPRCR (PLPRCR_SPLSS | PLPRCR_TEXPS | PLPRCR_TMIST)
|
||||
#endif /* CONFIG_80MHz */
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* SCCR - System Clock and reset Control Register 15-27
|
||||
@@ -279,17 +272,9 @@
|
||||
* power management and some other internal clocks
|
||||
*/
|
||||
#define SCCR_MASK SCCR_EBDF11
|
||||
#ifdef CONFIG_80MHz /* for 80 MHz, we use a 16 MHz clock * 5 */
|
||||
#define CFG_SCCR (/* SCCR_TBS | */ \
|
||||
SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
#define CFG_SCCR (SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
SCCR_DFNL000 | SCCR_DFNH000 | SCCR_DFLCD000 | \
|
||||
SCCR_DFALCD00)
|
||||
#else /* up to 66 MHz we use a 1:1 clock */
|
||||
#define CFG_SCCR (SCCR_TBS | \
|
||||
SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
SCCR_DFNL000 | SCCR_DFNH000 | SCCR_DFLCD000 | \
|
||||
SCCR_DFALCD00)
|
||||
#endif /* CONFIG_80MHz */
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* PCMCIA stuff
|
||||
@@ -358,19 +343,8 @@
|
||||
/*
|
||||
* FLASH timing:
|
||||
*/
|
||||
#if defined(CONFIG_80MHz)
|
||||
/* 80 MHz CPU - 40 MHz bus: ACS = 00, TRLX = 0, CSNT = 1, SCY = 3, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | 0 | OR_CSNT_SAM | \
|
||||
OR_SCY_3_CLK | OR_EHTR | OR_BI)
|
||||
#elif defined(CONFIG_66MHz)
|
||||
/* 66 MHz CPU - 66 MHz bus: ACS = 00, TRLX = 1, CSNT = 1, SCY = 3, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | OR_TRLX | OR_CSNT_SAM | \
|
||||
OR_SCY_3_CLK | OR_EHTR | OR_BI)
|
||||
#else /* 50 MHz */
|
||||
/* 50 MHz CPU - 50 MHz bus: ACS = 00, TRLX = 1, CSNT = 1, SCY = 2, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | OR_TRLX | OR_CSNT_SAM | \
|
||||
OR_SCY_2_CLK | OR_EHTR | OR_BI)
|
||||
#endif /*CONFIG_??MHz */
|
||||
|
||||
#define CFG_OR0_REMAP (CFG_REMAP_OR_AM | CFG_OR_TIMING_FLASH)
|
||||
#define CFG_OR0_PRELIM (CFG_PRELIM_OR_AM | CFG_OR_TIMING_FLASH)
|
||||
@@ -431,13 +405,9 @@
|
||||
* 66 Mhz => 66.000.000 / Divider = 129
|
||||
* 80 Mhz => 80.000.000 / Divider = 156
|
||||
*/
|
||||
#if defined(CONFIG_80MHz)
|
||||
#define CFG_MAMR_PTA 156
|
||||
#elif defined(CONFIG_66MHz)
|
||||
#define CFG_MAMR_PTA 129
|
||||
#else /* 50 MHz */
|
||||
#define CFG_MAMR_PTA 98
|
||||
#endif /*CONFIG_??MHz */
|
||||
|
||||
#define CFG_PTA_PER_CLK ((4096 * 32 * 1000) / (4 * 64))
|
||||
#define CFG_MAMR_PTA 98
|
||||
|
||||
/*
|
||||
* For 16 MBit, refresh rates could be 31.3 us
|
||||
|
||||
@@ -254,15 +254,8 @@
|
||||
*-----------------------------------------------------------------------
|
||||
* Reset PLL lock status sticky bit, timer expired status bit and timer
|
||||
* interrupt status bit
|
||||
*
|
||||
* If this is a 80 MHz CPU, set PLL multiplication factor to 5 (5*16=80)!
|
||||
*/
|
||||
#ifdef CONFIG_80MHz /* for 80 MHz, we use a 16 MHz clock * 5 */
|
||||
#define CFG_PLPRCR \
|
||||
( (5-1)<<PLPRCR_MF_SHIFT | PLPRCR_TEXPS | PLPRCR_TMIST )
|
||||
#else /* up to 66 MHz we use a 1:1 clock */
|
||||
#define CFG_PLPRCR (PLPRCR_SPLSS | PLPRCR_TEXPS | PLPRCR_TMIST)
|
||||
#endif /* CONFIG_80MHz */
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* SCCR - System Clock and reset Control Register 15-27
|
||||
@@ -271,17 +264,9 @@
|
||||
* power management and some other internal clocks
|
||||
*/
|
||||
#define SCCR_MASK SCCR_EBDF11
|
||||
#ifdef CONFIG_80MHz /* for 80 MHz, we use a 16 MHz clock * 5 */
|
||||
#define CFG_SCCR (/* SCCR_TBS | */ \
|
||||
SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
#define CFG_SCCR (SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
SCCR_DFNL000 | SCCR_DFNH000 | SCCR_DFLCD000 | \
|
||||
SCCR_DFALCD00)
|
||||
#else /* up to 66 MHz we use a 1:1 clock */
|
||||
#define CFG_SCCR (SCCR_TBS | \
|
||||
SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
SCCR_DFNL000 | SCCR_DFNH000 | SCCR_DFLCD000 | \
|
||||
SCCR_DFALCD00)
|
||||
#endif /* CONFIG_80MHz */
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* PCMCIA stuff
|
||||
@@ -350,19 +335,8 @@
|
||||
/*
|
||||
* FLASH timing:
|
||||
*/
|
||||
#if defined(CONFIG_80MHz)
|
||||
/* 80 MHz CPU - 40 MHz bus: ACS = 00, TRLX = 0, CSNT = 1, SCY = 3, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | 0 | OR_CSNT_SAM | \
|
||||
OR_SCY_3_CLK | OR_EHTR | OR_BI)
|
||||
#elif defined(CONFIG_66MHz)
|
||||
/* 66 MHz CPU - 66 MHz bus: ACS = 00, TRLX = 1, CSNT = 1, SCY = 3, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | OR_TRLX | OR_CSNT_SAM | \
|
||||
OR_SCY_3_CLK | OR_EHTR | OR_BI)
|
||||
#else /* 50 MHz */
|
||||
/* 50 MHz CPU - 50 MHz bus: ACS = 00, TRLX = 1, CSNT = 1, SCY = 2, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | OR_TRLX | OR_CSNT_SAM | \
|
||||
OR_SCY_2_CLK | OR_EHTR | OR_BI)
|
||||
#endif /*CONFIG_??MHz */
|
||||
|
||||
#define CFG_OR0_REMAP (CFG_REMAP_OR_AM | CFG_OR_TIMING_FLASH)
|
||||
#define CFG_OR0_PRELIM (CFG_PRELIM_OR_AM | CFG_OR_TIMING_FLASH)
|
||||
@@ -423,13 +397,9 @@
|
||||
* 66 Mhz => 66.000.000 / Divider = 129
|
||||
* 80 Mhz => 80.000.000 / Divider = 156
|
||||
*/
|
||||
#if defined(CONFIG_80MHz)
|
||||
#define CFG_MAMR_PTA 156
|
||||
#elif defined(CONFIG_66MHz)
|
||||
#define CFG_MAMR_PTA 129
|
||||
#else /* 50 MHz */
|
||||
#define CFG_MAMR_PTA 98
|
||||
#endif /*CONFIG_??MHz */
|
||||
|
||||
#define CFG_PTA_PER_CLK ((4096 * 32 * 1000) / (4 * 64))
|
||||
#define CFG_MAMR_PTA 98
|
||||
|
||||
/*
|
||||
* For 16 MBit, refresh rates could be 31.3 us
|
||||
|
||||
@@ -245,15 +245,8 @@
|
||||
*-----------------------------------------------------------------------
|
||||
* Reset PLL lock status sticky bit, timer expired status bit and timer
|
||||
* interrupt status bit
|
||||
*
|
||||
* If this is a 80 MHz CPU, set PLL multiplication factor to 5 (5*16=80)!
|
||||
*/
|
||||
#ifdef CONFIG_80MHz /* for 80 MHz, we use a 16 MHz clock * 5 */
|
||||
#define CFG_PLPRCR \
|
||||
( (5-1)<<PLPRCR_MF_SHIFT | PLPRCR_TEXPS | PLPRCR_TMIST )
|
||||
#else /* up to 66 MHz we use a 1:1 clock */
|
||||
#define CFG_PLPRCR (PLPRCR_SPLSS | PLPRCR_TEXPS | PLPRCR_TMIST)
|
||||
#endif /* CONFIG_80MHz */
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* SCCR - System Clock and reset Control Register 15-27
|
||||
@@ -262,17 +255,9 @@
|
||||
* power management and some other internal clocks
|
||||
*/
|
||||
#define SCCR_MASK SCCR_EBDF11
|
||||
#ifdef CONFIG_80MHz /* for 80 MHz, we use a 16 MHz clock * 5 */
|
||||
#define CFG_SCCR (/* SCCR_TBS | */ \
|
||||
SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
#define CFG_SCCR (SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
SCCR_DFNL000 | SCCR_DFNH000 | SCCR_DFLCD000 | \
|
||||
SCCR_DFALCD00)
|
||||
#else /* up to 66 MHz we use a 1:1 clock */
|
||||
#define CFG_SCCR (SCCR_TBS | \
|
||||
SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
SCCR_DFNL000 | SCCR_DFNH000 | SCCR_DFLCD000 | \
|
||||
SCCR_DFALCD00)
|
||||
#endif /* CONFIG_80MHz */
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* PCMCIA stuff
|
||||
@@ -341,19 +326,8 @@
|
||||
/*
|
||||
* FLASH timing:
|
||||
*/
|
||||
#if defined(CONFIG_80MHz)
|
||||
/* 80 MHz CPU - 40 MHz bus: ACS = 00, TRLX = 0, CSNT = 1, SCY = 3, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | 0 | OR_CSNT_SAM | \
|
||||
OR_SCY_3_CLK | OR_EHTR | OR_BI)
|
||||
#elif defined(CONFIG_66MHz)
|
||||
/* 66 MHz CPU - 66 MHz bus: ACS = 00, TRLX = 1, CSNT = 1, SCY = 3, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | OR_TRLX | OR_CSNT_SAM | \
|
||||
OR_SCY_3_CLK | OR_EHTR | OR_BI)
|
||||
#else /* 50 MHz */
|
||||
/* 50 MHz CPU - 50 MHz bus: ACS = 00, TRLX = 1, CSNT = 1, SCY = 2, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | OR_TRLX | OR_CSNT_SAM | \
|
||||
OR_SCY_2_CLK | OR_EHTR | OR_BI)
|
||||
#endif /*CONFIG_??MHz */
|
||||
|
||||
#define CFG_OR0_REMAP (CFG_REMAP_OR_AM | CFG_OR_TIMING_FLASH)
|
||||
#define CFG_OR0_PRELIM (CFG_PRELIM_OR_AM | CFG_OR_TIMING_FLASH)
|
||||
@@ -414,13 +388,9 @@
|
||||
* 66 Mhz => 66.000.000 / Divider = 129
|
||||
* 80 Mhz => 80.000.000 / Divider = 156
|
||||
*/
|
||||
#if defined(CONFIG_80MHz)
|
||||
#define CFG_MAMR_PTA 156
|
||||
#elif defined(CONFIG_66MHz)
|
||||
#define CFG_MAMR_PTA 129
|
||||
#else /* 50 MHz */
|
||||
#define CFG_MAMR_PTA 98
|
||||
#endif /*CONFIG_??MHz */
|
||||
|
||||
#define CFG_PTA_PER_CLK ((4096 * 32 * 1000) / (4 * 64))
|
||||
#define CFG_MAMR_PTA 98
|
||||
|
||||
/*
|
||||
* For 16 MBit, refresh rates could be 31.3 us
|
||||
|
||||
@@ -244,15 +244,8 @@
|
||||
*-----------------------------------------------------------------------
|
||||
* Reset PLL lock status sticky bit, timer expired status bit and timer
|
||||
* interrupt status bit
|
||||
*
|
||||
* If this is a 80 MHz CPU, set PLL multiplication factor to 5 (5*16=80)!
|
||||
*/
|
||||
#ifdef CONFIG_80MHz /* for 80 MHz, we use a 16 MHz clock * 5 */
|
||||
#define CFG_PLPRCR \
|
||||
( (5-1)<<PLPRCR_MF_SHIFT | PLPRCR_TEXPS | PLPRCR_TMIST )
|
||||
#else /* up to 66 MHz we use a 1:1 clock */
|
||||
#define CFG_PLPRCR (PLPRCR_SPLSS | PLPRCR_TEXPS | PLPRCR_TMIST)
|
||||
#endif /* CONFIG_80MHz */
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* SCCR - System Clock and reset Control Register 15-27
|
||||
@@ -261,17 +254,9 @@
|
||||
* power management and some other internal clocks
|
||||
*/
|
||||
#define SCCR_MASK SCCR_EBDF11
|
||||
#ifdef CONFIG_80MHz /* for 80 MHz, we use a 16 MHz clock * 5 */
|
||||
#define CFG_SCCR (/* SCCR_TBS | */ \
|
||||
SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
#define CFG_SCCR (SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
SCCR_DFNL000 | SCCR_DFNH000 | SCCR_DFLCD000 | \
|
||||
SCCR_DFALCD00)
|
||||
#else /* up to 66 MHz we use a 1:1 clock */
|
||||
#define CFG_SCCR (SCCR_TBS | \
|
||||
SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
SCCR_DFNL000 | SCCR_DFNH000 | SCCR_DFLCD000 | \
|
||||
SCCR_DFALCD00)
|
||||
#endif /* CONFIG_80MHz */
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* PCMCIA stuff
|
||||
@@ -340,19 +325,8 @@
|
||||
/*
|
||||
* FLASH timing:
|
||||
*/
|
||||
#if defined(CONFIG_80MHz)
|
||||
/* 80 MHz CPU - 40 MHz bus: ACS = 00, TRLX = 0, CSNT = 1, SCY = 3, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | 0 | OR_CSNT_SAM | \
|
||||
OR_SCY_3_CLK | OR_EHTR | OR_BI)
|
||||
#elif defined(CONFIG_66MHz)
|
||||
/* 66 MHz CPU - 66 MHz bus: ACS = 00, TRLX = 1, CSNT = 1, SCY = 3, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | OR_TRLX | OR_CSNT_SAM | \
|
||||
OR_SCY_3_CLK | OR_EHTR | OR_BI)
|
||||
#else /* 50 MHz */
|
||||
/* 50 MHz CPU - 50 MHz bus: ACS = 00, TRLX = 1, CSNT = 1, SCY = 2, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | OR_TRLX | OR_CSNT_SAM | \
|
||||
OR_SCY_2_CLK | OR_EHTR | OR_BI)
|
||||
#endif /*CONFIG_??MHz */
|
||||
|
||||
#define CFG_OR0_REMAP (CFG_REMAP_OR_AM | CFG_OR_TIMING_FLASH)
|
||||
#define CFG_OR0_PRELIM (CFG_PRELIM_OR_AM | CFG_OR_TIMING_FLASH)
|
||||
@@ -413,13 +387,9 @@
|
||||
* 66 Mhz => 66.000.000 / Divider = 129
|
||||
* 80 Mhz => 80.000.000 / Divider = 156
|
||||
*/
|
||||
#if defined(CONFIG_80MHz)
|
||||
#define CFG_MAMR_PTA 156
|
||||
#elif defined(CONFIG_66MHz)
|
||||
#define CFG_MAMR_PTA 129
|
||||
#else /* 50 MHz */
|
||||
#define CFG_MAMR_PTA 98
|
||||
#endif /*CONFIG_??MHz */
|
||||
|
||||
#define CFG_PTA_PER_CLK ((4096 * 32 * 1000) / (4 * 64))
|
||||
#define CFG_MAMR_PTA 98
|
||||
|
||||
/*
|
||||
* For 16 MBit, refresh rates could be 31.3 us
|
||||
|
||||
@@ -248,15 +248,8 @@
|
||||
*-----------------------------------------------------------------------
|
||||
* Reset PLL lock status sticky bit, timer expired status bit and timer
|
||||
* interrupt status bit
|
||||
*
|
||||
* If this is a 80 MHz CPU, set PLL multiplication factor to 5 (5*16=80)!
|
||||
*/
|
||||
#ifdef CONFIG_80MHz /* for 80 MHz, we use a 16 MHz clock * 5 */
|
||||
#define CFG_PLPRCR \
|
||||
( (5-1)<<PLPRCR_MF_SHIFT | PLPRCR_TEXPS | PLPRCR_TMIST )
|
||||
#else /* up to 66 MHz we use a 1:1 clock */
|
||||
#define CFG_PLPRCR (PLPRCR_SPLSS | PLPRCR_TEXPS | PLPRCR_TMIST)
|
||||
#endif /* CONFIG_80MHz */
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* SCCR - System Clock and reset Control Register 15-27
|
||||
@@ -265,17 +258,9 @@
|
||||
* power management and some other internal clocks
|
||||
*/
|
||||
#define SCCR_MASK SCCR_EBDF11
|
||||
#ifdef CONFIG_80MHz /* for 80 MHz, we use a 16 MHz clock * 5 */
|
||||
#define CFG_SCCR (/* SCCR_TBS | */ \
|
||||
SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
#define CFG_SCCR (SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
SCCR_DFNL000 | SCCR_DFNH000 | SCCR_DFLCD000 | \
|
||||
SCCR_DFALCD00)
|
||||
#else /* up to 66 MHz we use a 1:1 clock */
|
||||
#define CFG_SCCR (SCCR_TBS | \
|
||||
SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
SCCR_DFNL000 | SCCR_DFNH000 | SCCR_DFLCD000 | \
|
||||
SCCR_DFALCD00)
|
||||
#endif /* CONFIG_80MHz */
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* PCMCIA stuff
|
||||
@@ -344,19 +329,8 @@
|
||||
/*
|
||||
* FLASH timing:
|
||||
*/
|
||||
#if defined(CONFIG_80MHz)
|
||||
/* 80 MHz CPU - 40 MHz bus: ACS = 00, TRLX = 0, CSNT = 1, SCY = 3, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | 0 | OR_CSNT_SAM | \
|
||||
OR_SCY_3_CLK | OR_EHTR | OR_BI)
|
||||
#elif defined(CONFIG_66MHz)
|
||||
/* 66 MHz CPU - 66 MHz bus: ACS = 00, TRLX = 1, CSNT = 1, SCY = 3, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | OR_TRLX | OR_CSNT_SAM | \
|
||||
OR_SCY_3_CLK | OR_EHTR | OR_BI)
|
||||
#else /* 50 MHz */
|
||||
/* 50 MHz CPU - 50 MHz bus: ACS = 00, TRLX = 1, CSNT = 1, SCY = 2, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | OR_TRLX | OR_CSNT_SAM | \
|
||||
OR_SCY_2_CLK | OR_EHTR | OR_BI)
|
||||
#endif /*CONFIG_??MHz */
|
||||
|
||||
#define CFG_OR0_REMAP (CFG_REMAP_OR_AM | CFG_OR_TIMING_FLASH)
|
||||
#define CFG_OR0_PRELIM (CFG_PRELIM_OR_AM | CFG_OR_TIMING_FLASH)
|
||||
@@ -417,13 +391,9 @@
|
||||
* 66 Mhz => 66.000.000 / Divider = 129
|
||||
* 80 Mhz => 80.000.000 / Divider = 156
|
||||
*/
|
||||
#if defined(CONFIG_80MHz)
|
||||
#define CFG_MAMR_PTA 156
|
||||
#elif defined(CONFIG_66MHz)
|
||||
#define CFG_MAMR_PTA 129
|
||||
#else /* 50 MHz */
|
||||
#define CFG_MAMR_PTA 98
|
||||
#endif /*CONFIG_??MHz */
|
||||
|
||||
#define CFG_PTA_PER_CLK ((4096 * 32 * 1000) / (4 * 64))
|
||||
#define CFG_MAMR_PTA 98
|
||||
|
||||
/*
|
||||
* For 16 MBit, refresh rates could be 31.3 us
|
||||
|
||||
@@ -283,15 +283,8 @@
|
||||
*-----------------------------------------------------------------------
|
||||
* Reset PLL lock status sticky bit, timer expired status bit and timer
|
||||
* interrupt status bit
|
||||
*
|
||||
* If this is a 80 MHz CPU, set PLL multiplication factor to 5 (5*16=80)!
|
||||
*/
|
||||
#ifdef CONFIG_80MHz /* for 80 MHz, we use a 16 MHz clock * 5 */
|
||||
#define CFG_PLPRCR \
|
||||
( (5-1)<<PLPRCR_MF_SHIFT | PLPRCR_TEXPS | PLPRCR_TMIST )
|
||||
#else /* up to 66 MHz we use a 1:1 clock */
|
||||
#define CFG_PLPRCR (PLPRCR_SPLSS | PLPRCR_TEXPS | PLPRCR_TMIST)
|
||||
#endif /* CONFIG_80MHz */
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* SCCR - System Clock and reset Control Register 15-27
|
||||
@@ -300,17 +293,9 @@
|
||||
* power management and some other internal clocks
|
||||
*/
|
||||
#define SCCR_MASK SCCR_EBDF11
|
||||
#ifdef CONFIG_80MHz /* for 80 MHz, we use a 16 MHz clock * 5 */
|
||||
#define CFG_SCCR (/* SCCR_TBS | */ \
|
||||
SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
#define CFG_SCCR (SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
SCCR_DFNL000 | SCCR_DFNH000 | SCCR_DFLCD000 | \
|
||||
SCCR_DFALCD00)
|
||||
#else /* up to 66 MHz we use a 1:1 clock */
|
||||
#define CFG_SCCR (SCCR_TBS | \
|
||||
SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
SCCR_DFNL000 | SCCR_DFNH000 | SCCR_DFLCD000 | \
|
||||
SCCR_DFALCD00)
|
||||
#endif /* CONFIG_80MHz */
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* PCMCIA stuff
|
||||
@@ -379,19 +364,8 @@
|
||||
/*
|
||||
* FLASH timing:
|
||||
*/
|
||||
#if defined(CONFIG_80MHz)
|
||||
/* 80 MHz CPU - 40 MHz bus: ACS = 00, TRLX = 0, CSNT = 1, SCY = 3, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | 0 | OR_CSNT_SAM | \
|
||||
OR_SCY_3_CLK | OR_EHTR | OR_BI)
|
||||
#elif defined(CONFIG_66MHz)
|
||||
/* 66 MHz CPU - 66 MHz bus: ACS = 00, TRLX = 1, CSNT = 1, SCY = 3, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | OR_TRLX | OR_CSNT_SAM | \
|
||||
OR_SCY_3_CLK | OR_EHTR | OR_BI)
|
||||
#else /* 50 MHz */
|
||||
/* 50 MHz CPU - 50 MHz bus: ACS = 00, TRLX = 1, CSNT = 1, SCY = 2, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | OR_TRLX | OR_CSNT_SAM | \
|
||||
OR_SCY_2_CLK | OR_EHTR | OR_BI)
|
||||
#endif /*CONFIG_??MHz */
|
||||
|
||||
#define CFG_OR0_REMAP (CFG_REMAP_OR_AM | CFG_OR_TIMING_FLASH)
|
||||
#define CFG_OR0_PRELIM (CFG_PRELIM_OR_AM | CFG_OR_TIMING_FLASH)
|
||||
@@ -452,13 +426,9 @@
|
||||
* 66 Mhz => 66.000.000 / Divider = 129
|
||||
* 80 Mhz => 80.000.000 / Divider = 156
|
||||
*/
|
||||
#if defined(CONFIG_80MHz)
|
||||
#define CFG_MAMR_PTA 156
|
||||
#elif defined(CONFIG_66MHz)
|
||||
#define CFG_MAMR_PTA 129
|
||||
#else /* 50 MHz */
|
||||
#define CFG_MAMR_PTA 98
|
||||
#endif /*CONFIG_??MHz */
|
||||
|
||||
#define CFG_PTA_PER_CLK ((4096 * 32 * 1000) / (4 * 64))
|
||||
#define CFG_MAMR_PTA 98
|
||||
|
||||
/*
|
||||
* For 16 MBit, refresh rates could be 31.3 us
|
||||
|
||||
@@ -249,15 +249,8 @@
|
||||
*-----------------------------------------------------------------------
|
||||
* Reset PLL lock status sticky bit, timer expired status bit and timer
|
||||
* interrupt status bit
|
||||
*
|
||||
* If this is a 80 MHz CPU, set PLL multiplication factor to 5 (5*16=80)!
|
||||
*/
|
||||
#ifdef CONFIG_80MHz /* for 80 MHz, we use a 16 MHz clock * 5 */
|
||||
#define CFG_PLPRCR \
|
||||
( (5-1)<<PLPRCR_MF_SHIFT | PLPRCR_TEXPS | PLPRCR_TMIST )
|
||||
#else /* up to 66 MHz we use a 1:1 clock */
|
||||
#define CFG_PLPRCR (PLPRCR_SPLSS | PLPRCR_TEXPS | PLPRCR_TMIST)
|
||||
#endif /* CONFIG_80MHz */
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* SCCR - System Clock and reset Control Register 15-27
|
||||
@@ -266,17 +259,9 @@
|
||||
* power management and some other internal clocks
|
||||
*/
|
||||
#define SCCR_MASK SCCR_EBDF11
|
||||
#ifdef CONFIG_80MHz /* for 80 MHz, we use a 16 MHz clock * 5 */
|
||||
#define CFG_SCCR (/* SCCR_TBS | */ \
|
||||
SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
#define CFG_SCCR (SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
SCCR_DFNL000 | SCCR_DFNH000 | SCCR_DFLCD000 | \
|
||||
SCCR_DFALCD00)
|
||||
#else /* up to 66 MHz we use a 1:1 clock */
|
||||
#define CFG_SCCR (SCCR_TBS | \
|
||||
SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
SCCR_DFNL000 | SCCR_DFNH000 | SCCR_DFLCD000 | \
|
||||
SCCR_DFALCD00)
|
||||
#endif /* CONFIG_80MHz */
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* PCMCIA stuff
|
||||
@@ -345,19 +330,8 @@
|
||||
/*
|
||||
* FLASH timing:
|
||||
*/
|
||||
#if defined(CONFIG_80MHz)
|
||||
/* 80 MHz CPU - 40 MHz bus: ACS = 00, TRLX = 0, CSNT = 1, SCY = 3, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | 0 | OR_CSNT_SAM | \
|
||||
OR_SCY_3_CLK | OR_EHTR | OR_BI)
|
||||
#elif defined(CONFIG_66MHz)
|
||||
/* 66 MHz CPU - 66 MHz bus: ACS = 00, TRLX = 1, CSNT = 1, SCY = 3, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | OR_TRLX | OR_CSNT_SAM | \
|
||||
OR_SCY_3_CLK | OR_EHTR | OR_BI)
|
||||
#else /* 50 MHz */
|
||||
/* 50 MHz CPU - 50 MHz bus: ACS = 00, TRLX = 1, CSNT = 1, SCY = 2, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | OR_TRLX | OR_CSNT_SAM | \
|
||||
OR_SCY_2_CLK | OR_EHTR | OR_BI)
|
||||
#endif /*CONFIG_??MHz */
|
||||
|
||||
#define CFG_OR0_REMAP (CFG_REMAP_OR_AM | CFG_OR_TIMING_FLASH)
|
||||
#define CFG_OR0_PRELIM (CFG_PRELIM_OR_AM | CFG_OR_TIMING_FLASH)
|
||||
@@ -418,13 +392,9 @@
|
||||
* 66 Mhz => 66.000.000 / Divider = 129
|
||||
* 80 Mhz => 80.000.000 / Divider = 156
|
||||
*/
|
||||
#if defined(CONFIG_80MHz)
|
||||
#define CFG_MAMR_PTA 156
|
||||
#elif defined(CONFIG_66MHz)
|
||||
#define CFG_MAMR_PTA 129
|
||||
#else /* 50 MHz */
|
||||
#define CFG_MAMR_PTA 98
|
||||
#endif /*CONFIG_??MHz */
|
||||
|
||||
#define CFG_PTA_PER_CLK ((4096 * 32 * 1000) / (4 * 64))
|
||||
#define CFG_MAMR_PTA 98
|
||||
|
||||
/*
|
||||
* For 16 MBit, refresh rates could be 31.3 us
|
||||
|
||||
@@ -250,15 +250,8 @@
|
||||
*-----------------------------------------------------------------------
|
||||
* Reset PLL lock status sticky bit, timer expired status bit and timer
|
||||
* interrupt status bit
|
||||
*
|
||||
* If this is a 80 MHz CPU, set PLL multiplication factor to 5 (5*16=80)!
|
||||
*/
|
||||
#ifdef CONFIG_80MHz /* for 80 MHz, we use a 16 MHz clock * 5 */
|
||||
#define CFG_PLPRCR \
|
||||
( (5-1)<<PLPRCR_MF_SHIFT | PLPRCR_TEXPS | PLPRCR_TMIST )
|
||||
#else /* up to 66 MHz we use a 1:1 clock */
|
||||
#define CFG_PLPRCR (PLPRCR_SPLSS | PLPRCR_TEXPS | PLPRCR_TMIST)
|
||||
#endif /* CONFIG_80MHz */
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* SCCR - System Clock and reset Control Register 15-27
|
||||
@@ -267,17 +260,9 @@
|
||||
* power management and some other internal clocks
|
||||
*/
|
||||
#define SCCR_MASK SCCR_EBDF11
|
||||
#ifdef CONFIG_80MHz /* for 80 MHz, we use a 16 MHz clock * 5 */
|
||||
#define CFG_SCCR (/* SCCR_TBS | */ \
|
||||
SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
#define CFG_SCCR (SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
SCCR_DFNL000 | SCCR_DFNH000 | SCCR_DFLCD000 | \
|
||||
SCCR_DFALCD00)
|
||||
#else /* up to 66 MHz we use a 1:1 clock */
|
||||
#define CFG_SCCR (SCCR_TBS | \
|
||||
SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
SCCR_DFNL000 | SCCR_DFNH000 | SCCR_DFLCD000 | \
|
||||
SCCR_DFALCD00)
|
||||
#endif /* CONFIG_80MHz */
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* PCMCIA stuff
|
||||
@@ -346,19 +331,8 @@
|
||||
/*
|
||||
* FLASH timing:
|
||||
*/
|
||||
#if defined(CONFIG_80MHz)
|
||||
/* 80 MHz CPU - 40 MHz bus: ACS = 00, TRLX = 0, CSNT = 1, SCY = 3, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | 0 | OR_CSNT_SAM | \
|
||||
OR_SCY_3_CLK | OR_EHTR | OR_BI)
|
||||
#elif defined(CONFIG_66MHz)
|
||||
/* 66 MHz CPU - 66 MHz bus: ACS = 00, TRLX = 1, CSNT = 1, SCY = 3, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | OR_TRLX | OR_CSNT_SAM | \
|
||||
OR_SCY_3_CLK | OR_EHTR | OR_BI)
|
||||
#else /* 50 MHz */
|
||||
/* 50 MHz CPU - 50 MHz bus: ACS = 00, TRLX = 1, CSNT = 1, SCY = 2, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | OR_TRLX | OR_CSNT_SAM | \
|
||||
OR_SCY_2_CLK | OR_EHTR | OR_BI)
|
||||
#endif /*CONFIG_??MHz */
|
||||
|
||||
#define CFG_OR0_REMAP (CFG_REMAP_OR_AM | CFG_OR_TIMING_FLASH)
|
||||
#define CFG_OR0_PRELIM (CFG_PRELIM_OR_AM | CFG_OR_TIMING_FLASH)
|
||||
@@ -419,13 +393,9 @@
|
||||
* 66 Mhz => 66.000.000 / Divider = 129
|
||||
* 80 Mhz => 80.000.000 / Divider = 156
|
||||
*/
|
||||
#if defined(CONFIG_80MHz)
|
||||
#define CFG_MAMR_PTA 156
|
||||
#elif defined(CONFIG_66MHz)
|
||||
#define CFG_MAMR_PTA 129
|
||||
#else /* 50 MHz */
|
||||
#define CFG_MAMR_PTA 98
|
||||
#endif /*CONFIG_??MHz */
|
||||
|
||||
#define CFG_PTA_PER_CLK ((4096 * 32 * 1000) / (4 * 64))
|
||||
#define CFG_MAMR_PTA 98
|
||||
|
||||
/*
|
||||
* For 16 MBit, refresh rates could be 31.3 us
|
||||
|
||||
@@ -252,16 +252,8 @@
|
||||
*-----------------------------------------------------------------------
|
||||
* Reset PLL lock status sticky bit, timer expired status bit and timer
|
||||
* interrupt status bit
|
||||
*
|
||||
* If this is a 80 MHz or 100 MHz CPU,
|
||||
* set PLL multiplication factor to 5 (5 * 16 = 80, 5 * 20 = 100)
|
||||
*/
|
||||
#if defined(CONFIG_80MHz) || defined(CONFIG_100MHz)
|
||||
#define CFG_PLPRCR \
|
||||
( (5-1)<<PLPRCR_MF_SHIFT | PLPRCR_TEXPS | PLPRCR_TMIST )
|
||||
#else /* up to 66 MHz we use a 1:1 clock */
|
||||
#define CFG_PLPRCR (PLPRCR_SPLSS | PLPRCR_TEXPS | PLPRCR_TMIST)
|
||||
#endif /* CONFIG_80MHz | CONFIG_100MHz */
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* SCCR - System Clock and reset Control Register 15-27
|
||||
@@ -270,17 +262,9 @@
|
||||
* power management and some other internal clocks
|
||||
*/
|
||||
#define SCCR_MASK SCCR_EBDF11
|
||||
#if defined(CONFIG_80MHz) || defined(CONFIG_100MHz) /* use 16/20 MHz * 5 */
|
||||
#define CFG_SCCR (/* SCCR_TBS | */ \
|
||||
SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
#define CFG_SCCR (SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
SCCR_DFNL000 | SCCR_DFNH000 | SCCR_DFLCD000 | \
|
||||
SCCR_DFALCD00)
|
||||
#else /* up to 66 MHz we use a 1:1 clock */
|
||||
#define CFG_SCCR (SCCR_TBS | \
|
||||
SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
SCCR_DFNL000 | SCCR_DFNH000 | SCCR_DFLCD000 | \
|
||||
SCCR_DFALCD00)
|
||||
#endif /* CONFIG_80MHz | CONFIG_100MHz */
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* PCMCIA stuff
|
||||
@@ -349,24 +333,8 @@
|
||||
/*
|
||||
* FLASH timing:
|
||||
*/
|
||||
#if defined(CONFIG_100MHz)
|
||||
/* 100 MHz CPU - 50 MHz bus:
|
||||
* ACS = 01, TRLX = 0, CSNT = 0, SCY = 7, EHTR = 0 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV4 | OR_SCY_7_CLK | OR_BI)
|
||||
#elif defined(CONFIG_80MHz)
|
||||
/* 80 MHz CPU - 40 MHz bus:
|
||||
* ACS = 00, TRLX = 0, CSNT = 1, SCY = 3, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | 0 | OR_CSNT_SAM | \
|
||||
OR_SCY_3_CLK | OR_EHTR | OR_BI)
|
||||
#elif defined(CONFIG_66MHz)
|
||||
/* 66 MHz CPU - 66 MHz bus: ACS = 00, TRLX = 1, CSNT = 1, SCY = 3, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | OR_TRLX | OR_CSNT_SAM | \
|
||||
OR_SCY_3_CLK | OR_EHTR | OR_BI)
|
||||
#else /* 50 MHz */
|
||||
/* 50 MHz CPU - 50 MHz bus: ACS = 00, TRLX = 1, CSNT = 1, SCY = 2, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | OR_TRLX | OR_CSNT_SAM | \
|
||||
OR_SCY_2_CLK | OR_EHTR | OR_BI)
|
||||
#endif /*CONFIG_??MHz */
|
||||
|
||||
#define CFG_OR0_REMAP (CFG_REMAP_OR_AM | CFG_OR_TIMING_FLASH)
|
||||
#define CFG_OR0_PRELIM (CFG_PRELIM_OR_AM | CFG_OR_TIMING_FLASH)
|
||||
@@ -428,15 +396,9 @@
|
||||
* 80 Mhz => 80.000.000 / Divider = 156
|
||||
* 100 Mhz => 100.000.000 / Divider = 195
|
||||
*/
|
||||
#if defined(CONFIG_100MHz)
|
||||
#define CFG_MAMR_PTA 195
|
||||
#elif defined(CONFIG_80MHz)
|
||||
#define CFG_MAMR_PTA 156
|
||||
#elif defined(CONFIG_66MHz)
|
||||
#define CFG_MAMR_PTA 129
|
||||
#else /* 50 MHz */
|
||||
#define CFG_MAMR_PTA 98
|
||||
#endif /*CONFIG_??MHz */
|
||||
|
||||
#define CFG_PTA_PER_CLK ((4096 * 32 * 1000) / (4 * 64))
|
||||
#define CFG_MAMR_PTA 98
|
||||
|
||||
/*
|
||||
* For 16 MBit, refresh rates could be 31.3 us
|
||||
|
||||
@@ -253,16 +253,8 @@
|
||||
*-----------------------------------------------------------------------
|
||||
* Reset PLL lock status sticky bit, timer expired status bit and timer
|
||||
* interrupt status bit
|
||||
*
|
||||
* If this is a 80 MHz or 100 MHz CPU,
|
||||
* set PLL multiplication factor to 5 (5 * 16 = 80, 5 * 20 = 100)
|
||||
*/
|
||||
#if defined(CONFIG_80MHz) || defined(CONFIG_100MHz)
|
||||
#define CFG_PLPRCR \
|
||||
( (5-1)<<PLPRCR_MF_SHIFT | PLPRCR_TEXPS | PLPRCR_TMIST )
|
||||
#else /* up to 66 MHz we use a 1:1 clock */
|
||||
#define CFG_PLPRCR (PLPRCR_SPLSS | PLPRCR_TEXPS | PLPRCR_TMIST)
|
||||
#endif /* CONFIG_80MHz | CONFIG_100MHz */
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* SCCR - System Clock and reset Control Register 15-27
|
||||
@@ -271,17 +263,9 @@
|
||||
* power management and some other internal clocks
|
||||
*/
|
||||
#define SCCR_MASK SCCR_EBDF11
|
||||
#if defined(CONFIG_80MHz) || defined(CONFIG_100MHz) /* use 16/20 MHz * 5 */
|
||||
#define CFG_SCCR (/* SCCR_TBS | */ \
|
||||
SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
#define CFG_SCCR (SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
SCCR_DFNL000 | SCCR_DFNH000 | SCCR_DFLCD000 | \
|
||||
SCCR_DFALCD00)
|
||||
#else /* up to 66 MHz we use a 1:1 clock */
|
||||
#define CFG_SCCR (SCCR_TBS | \
|
||||
SCCR_COM00 | SCCR_DFSYNC00 | SCCR_DFBRG00 | \
|
||||
SCCR_DFNL000 | SCCR_DFNH000 | SCCR_DFLCD000 | \
|
||||
SCCR_DFALCD00)
|
||||
#endif /* CONFIG_80MHz | CONFIG_100MHz */
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* PCMCIA stuff
|
||||
@@ -350,24 +334,8 @@
|
||||
/*
|
||||
* FLASH timing:
|
||||
*/
|
||||
#if defined(CONFIG_100MHz)
|
||||
/* 100 MHz CPU - 50 MHz bus:
|
||||
* ACS = 01, TRLX = 0, CSNT = 0, SCY = 7, EHTR = 0 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV4 | OR_SCY_7_CLK | OR_BI)
|
||||
#elif defined(CONFIG_80MHz)
|
||||
/* 80 MHz CPU - 40 MHz bus:
|
||||
* ACS = 00, TRLX = 0, CSNT = 1, SCY = 3, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | 0 | OR_CSNT_SAM | \
|
||||
OR_SCY_3_CLK | OR_EHTR | OR_BI)
|
||||
#elif defined(CONFIG_66MHz)
|
||||
/* 66 MHz CPU - 66 MHz bus: ACS = 00, TRLX = 1, CSNT = 1, SCY = 3, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | OR_TRLX | OR_CSNT_SAM | \
|
||||
OR_SCY_3_CLK | OR_EHTR | OR_BI)
|
||||
#else /* 50 MHz */
|
||||
/* 50 MHz CPU - 50 MHz bus: ACS = 00, TRLX = 1, CSNT = 1, SCY = 2, EHTR = 1 */
|
||||
#define CFG_OR_TIMING_FLASH (OR_ACS_DIV1 | OR_TRLX | OR_CSNT_SAM | \
|
||||
OR_SCY_2_CLK | OR_EHTR | OR_BI)
|
||||
#endif /*CONFIG_??MHz */
|
||||
|
||||
#define CFG_OR0_REMAP (CFG_REMAP_OR_AM | CFG_OR_TIMING_FLASH)
|
||||
#define CFG_OR0_PRELIM (CFG_PRELIM_OR_AM | CFG_OR_TIMING_FLASH)
|
||||
@@ -429,15 +397,9 @@
|
||||
* 80 Mhz => 80.000.000 / Divider = 156
|
||||
* 100 Mhz => 100.000.000 / Divider = 195
|
||||
*/
|
||||
#if defined(CONFIG_100MHz)
|
||||
#define CFG_MAMR_PTA 195
|
||||
#elif defined(CONFIG_80MHz)
|
||||
#define CFG_MAMR_PTA 156
|
||||
#elif defined(CONFIG_66MHz)
|
||||
#define CFG_MAMR_PTA 129
|
||||
#else /* 50 MHz */
|
||||
#define CFG_MAMR_PTA 98
|
||||
#endif /*CONFIG_??MHz */
|
||||
|
||||
#define CFG_PTA_PER_CLK ((4096 * 32 * 1000) / (4 * 64))
|
||||
#define CFG_MAMR_PTA 98
|
||||
|
||||
/*
|
||||
* For 16 MBit, refresh rates could be 31.3 us
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
#include <cmd_confdefs.h>
|
||||
|
||||
#define CONFIG_BOOTDELAY 2
|
||||
#define CONFIG_BOOTARGS "root=/dev/nfs mem=128M ip=dhcp netdev=27,0,0xfc800000,0xfc800010,eth0"
|
||||
#define CONFIG_BOOTARGS "root=/dev/nfs mem=128M ip=dhcp netdev=25,0,0xf1010000,0xf1010010,eth0"
|
||||
/*#define CONFIG_BOOTCOMMAND "bootp ; bootm" */
|
||||
|
||||
/*
|
||||
|
||||
@@ -93,6 +93,11 @@ int miiphy_link(unsigned char addr);
|
||||
#define PHY_BMCR_DPLX 0x0100
|
||||
#define PHY_BMCR_COL_TST 0x0080
|
||||
|
||||
#define PHY_BMCR_SPEED_MASK 0x2040
|
||||
#define PHY_BMCR_1000_MBPS 0x0040
|
||||
#define PHY_BMCR_100_MBPS 0x2000
|
||||
#define PHY_BMCR_10_MBPS 0x0000
|
||||
|
||||
/* phy BMSR */
|
||||
#define PHY_BMSR_100T4 0x8000
|
||||
#define PHY_BMSR_100TXF 0x4000
|
||||
@@ -118,6 +123,10 @@ int miiphy_link(unsigned char addr);
|
||||
#define PHY_ANLPAR_10 0x0020
|
||||
#define PHY_ANLPAR_100 0x0380 /* we can run at 100 */
|
||||
|
||||
#define PHY_ANLPAR_PSB_MASK 0x001f
|
||||
#define PHY_ANLPAR_PSB_802_3 0x0001
|
||||
#define PHY_ANLPAR_PSB_802_9 0x0002
|
||||
|
||||
/* PHY_1000BTSR */
|
||||
#define PHY_1000BTSR_MSCF 0x8000
|
||||
#define PHY_1000BTSR_MSCR 0x4000
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -265,6 +265,9 @@ init_fnc_t *init_sequence[] = {
|
||||
|
||||
#if !defined(CONFIG_TQM866M)
|
||||
get_clocks, /* get CPU and bus clocks (etc.) */
|
||||
#if defined(CONFIG_TQM8xxL) && !defined(CONFIG_TQM866M)
|
||||
adjust_sdram_tbs_8xx,
|
||||
#endif
|
||||
init_timebase,
|
||||
#endif
|
||||
#ifdef CFG_ALLOC_DPRAM
|
||||
|
||||
Reference in New Issue
Block a user