summaryrefslogtreecommitdiff
path: root/board/esd
diff options
context:
space:
mode:
Diffstat (limited to 'board/esd')
-rw-r--r--board/esd/pmc440/cmd_pmc440.c17
-rw-r--r--board/esd/pmc440/pmc440.c17
2 files changed, 15 insertions, 19 deletions
diff --git a/board/esd/pmc440/cmd_pmc440.c b/board/esd/pmc440/cmd_pmc440.c
index 0202876..f1ffb7b 100644
--- a/board/esd/pmc440/cmd_pmc440.c
+++ b/board/esd/pmc440/cmd_pmc440.c
@@ -342,7 +342,8 @@ U_BOOT_CMD(
#if defined(CONFIG_PRAM)
#include <environment.h>
-extern env_t *env_ptr;
+#include <search.h>
+#include <errno.h>
int do_painit(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
@@ -351,6 +352,10 @@ int do_painit(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
u32 param;
ulong *lptr;
+ env_t *envp;
+ char *res;
+ int len;
+
v = getenv("pram");
if (v)
pram = simple_strtoul(v, NULL, 10);
@@ -384,7 +389,15 @@ int do_painit(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
/* env is first (4k aligned) */
nextbase -= ((CONFIG_ENV_SIZE + 4096 - 1) & ~(4096 - 1));
- memcpy((void*)nextbase, env_ptr, CONFIG_ENV_SIZE);
+ envp = (env_t *)nextbase;
+ res = (char *)envp->data;
+ len = hexport_r(&env_htab, '\0', &res, ENV_SIZE, 0, NULL);
+ if (len < 0) {
+ error("Cannot export environment: errno = %d\n", errno);
+ return 1;
+ }
+ envp->crc = crc32(0, envp->data, ENV_SIZE);
+
*(--lptr) = CONFIG_ENV_SIZE; /* size */
*(--lptr) = base - nextbase; /* offset | type=0 */
diff --git a/board/esd/pmc440/pmc440.c b/board/esd/pmc440/pmc440.c
index 5236f44..3713e37 100644
--- a/board/esd/pmc440/pmc440.c
+++ b/board/esd/pmc440/pmc440.c
@@ -574,8 +574,6 @@ void pci_target_init(struct pci_controller *hose)
/* No error reporting */
pci_hose_write_config_word(hose, 0, PCI_ERREN, 0);
- pci_write_config_dword(0, PCI_BRDGOPT2, 0x00000101);
-
if (!is_monarch()) {
/* Program the board's subsystem id/classcode */
pci_hose_write_config_word(hose, 0, PCI_SUBSYSTEM_ID,
@@ -617,21 +615,6 @@ void pci_master_init(struct pci_controller *hose)
static void wait_for_pci_ready(void)
{
- int i;
- char *s = getenv("pcidelay");
- /*
- * We have our own handling of the pcidelay variable.
- * Using CONFIG_PCI_BOOTDELAY enables pausing for host
- * and adapter devices. For adapter devices we do not
- * want this.
- */
- if (s) {
- int ms = simple_strtoul(s, NULL, 10);
- printf("PCI: Waiting for %d ms\n", ms);
- for (i=0; i<ms; i++)
- udelay(1000);
- }
-
if (!(in_be32((void*)GPIO1_IR) & GPIO1_PPC_EREADY)) {
printf("PCI: Waiting for EREADY (CTRL-C to skip) ... ");
while (1) {