summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
Diffstat (limited to 'board')
-rw-r--r--board/esd/cpci750/sdram_init.c2
-rw-r--r--board/freescale/common/pixis.c8
-rw-r--r--board/mpc8641hpcn/mpc8641hpcn.c164
-rw-r--r--board/mpc8641hpcn/sys_eeprom.c16
-rw-r--r--board/mpc8641hpcn/u-boot.lds1
-rw-r--r--board/spc1920/hpi.c8
-rw-r--r--board/trab/Makefile1
7 files changed, 147 insertions, 53 deletions
diff --git a/board/esd/cpci750/sdram_init.c b/board/esd/cpci750/sdram_init.c
index c094755..78d1880 100644
--- a/board/esd/cpci750/sdram_init.c
+++ b/board/esd/cpci750/sdram_init.c
@@ -1252,7 +1252,7 @@ static int check_dimm (uchar slot, AUX_MEM_DIMM_INFO * dimmInfo)
/* sets up the GT properly with information passed in */
int setup_sdram (AUX_MEM_DIMM_INFO * info)
{
- ulong tmp, check;
+ ulong tmp;
ulong tmp_sdram_mode = 0; /* 0x141c */
ulong tmp_dunit_control_low = 0; /* 0x1404 */
int i;
diff --git a/board/freescale/common/pixis.c b/board/freescale/common/pixis.c
index af98157..99cc2ee 100644
--- a/board/freescale/common/pixis.c
+++ b/board/freescale/common/pixis.c
@@ -321,10 +321,10 @@ static ulong strfractoint(uchar *strptr)
mulconst = 1;
for (i = 0; i < decarr_len; i++)
mulconst *= 10;
- decval = simple_strtoul(decarr, NULL, 10);
+ decval = simple_strtoul((char *)decarr, NULL, 10);
}
- intval = simple_strtoul(intarr, NULL, 10);
+ intval = simple_strtoul((char *)intarr, NULL, 10);
intval = intval * mulconst;
retval = intval + decval;
@@ -362,7 +362,7 @@ pixis_reset_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
val = set_px_sysclk(simple_strtoul(argv[2], NULL, 10));
- corepll = strfractoint(argv[3]);
+ corepll = strfractoint((uchar *)argv[3]);
val = val + set_px_corepll(corepll);
val = val + set_px_mpxpll(simple_strtoul(argv[4], NULL, 10));
if (val == 3) {
@@ -410,7 +410,7 @@ pixis_reset_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
read_from_px_regs(0);
read_from_px_regs_altbank(0);
val = set_px_sysclk(simple_strtoul(argv[3], NULL, 10));
- corepll = strfractoint(argv[4]);
+ corepll = strfractoint((uchar *)argv[4]);
val = val + set_px_corepll(corepll);
val = val + set_px_mpxpll(simple_strtoul(argv[5],
NULL, 10));
diff --git a/board/mpc8641hpcn/mpc8641hpcn.c b/board/mpc8641hpcn/mpc8641hpcn.c
index 7d7e2af..d2182ab 100644
--- a/board/mpc8641hpcn/mpc8641hpcn.c
+++ b/board/mpc8641hpcn/mpc8641hpcn.c
@@ -11,7 +11,7 @@
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
@@ -24,6 +24,7 @@
#include <pci.h>
#include <asm/processor.h>
#include <asm/immap_86xx.h>
+#include <asm/immap_fsl_pci.h>
#include <spd.h>
#include <asm/io.h>
@@ -55,36 +56,6 @@ int checkboard(void)
{
puts("Board: MPC8641HPCN\n");
-#ifdef CONFIG_PCI
-
- volatile immap_t *immap = (immap_t *) CFG_CCSRBAR;
- volatile ccsr_gur_t *gur = &immap->im_gur;
- volatile ccsr_pex_t *pex1 = &immap->im_pex1;
-
- uint devdisr = gur->devdisr;
- uint io_sel = (gur->pordevsr & MPC86xx_PORDEVSR_IO_SEL) >> 16;
- uint host1_agent = (gur->porbmsr & MPC86xx_PORBMSR_HA) >> 17;
- uint pex1_agent = (host1_agent == 0) || (host1_agent == 1);
-
- if ((io_sel == 2 || io_sel == 3 || io_sel == 5
- || io_sel == 6 || io_sel == 7 || io_sel == 0xF)
- && !(devdisr & MPC86xx_DEVDISR_PCIEX1)) {
- debug("PCI-EXPRESS 1: %s \n", pex1_agent ? "Agent" : "Host");
- debug("0x%08x=0x%08x ", &pex1->pme_msg_det, pex1->pme_msg_det);
- if (pex1->pme_msg_det) {
- pex1->pme_msg_det = 0xffffffff;
- debug(" with errors. Clearing. Now 0x%08x",
- pex1->pme_msg_det);
- }
- debug("\n");
- } else {
- puts("PCI-EXPRESS 1: Disabled\n");
- }
-
-#else
- puts("PCI-EXPRESS1: Disabled\n");
-#endif
-
return 0;
}
@@ -219,21 +190,138 @@ static struct pci_config_table pci_fsl86xxads_config_table[] = {
#endif
-static struct pci_controller hose = {
+static struct pci_controller pci1_hose = {
#ifndef CONFIG_PCI_PNP
- config_table:pci_mpc86xxcts_config_table,
+ config_table:pci_mpc86xxcts_config_table
#endif
};
-
#endif /* CONFIG_PCI */
+#ifdef CONFIG_PCI2
+static struct pci_controller pci2_hose;
+#endif /* CONFIG_PCI2 */
+
+int first_free_busno = 0;
+
+
void pci_init_board(void)
{
-#ifdef CONFIG_PCI
- extern void pci_mpc86xx_init(struct pci_controller *hose);
+ volatile immap_t *immap = (immap_t *) CFG_CCSRBAR;
+ volatile ccsr_gur_t *gur = &immap->im_gur;
+ uint devdisr = gur->devdisr;
+ uint io_sel = (gur->pordevsr & MPC86xx_PORDEVSR_IO_SEL) >> 16;
+
+#ifdef CONFIG_PCI1
+{
+ volatile ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *) CFG_PCI1_ADDR;
+ extern void fsl_pci_init(struct pci_controller *hose);
+ struct pci_controller *hose = &pci1_hose;
+#ifdef DEBUG
+ uint host1_agent = (gur->porbmsr & MPC86xx_PORBMSR_HA) >> 17;
+ uint pex1_agent = (host1_agent == 0) || (host1_agent == 1);
+#endif
+ if ((io_sel == 2 || io_sel == 3 || io_sel == 5
+ || io_sel == 6 || io_sel == 7 || io_sel == 0xF)
+ && !(devdisr & MPC86xx_DEVDISR_PCIEX1)) {
+ debug("PCI-EXPRESS 1: %s \n", pex1_agent ? "Agent" : "Host");
+ debug("0x%08x=0x%08x ", &pci->pme_msg_det, pci->pme_msg_det);
+ if (pci->pme_msg_det) {
+ pci->pme_msg_det = 0xffffffff;
+ debug(" with errors. Clearing. Now 0x%08x",
+ pci->pme_msg_det);
+ }
+ debug("\n");
+
+ /* inbound */
+ pci_set_region(hose->regions + 0,
+ CFG_PCI_MEMORY_BUS,
+ CFG_PCI_MEMORY_PHYS,
+ CFG_PCI_MEMORY_SIZE,
+ PCI_REGION_MEM | PCI_REGION_MEMORY);
+
+ /* outbound memory */
+ pci_set_region(hose->regions + 1,
+ CFG_PCI1_MEM_BASE,
+ CFG_PCI1_MEM_PHYS,
+ CFG_PCI1_MEM_SIZE,
+ PCI_REGION_MEM);
+
+ /* outbound io */
+ pci_set_region(hose->regions + 2,
+ CFG_PCI1_IO_BASE,
+ CFG_PCI1_IO_PHYS,
+ CFG_PCI1_IO_SIZE,
+ PCI_REGION_IO);
+
+ hose->region_count = 3;
+
+ hose->first_busno=first_free_busno;
+ pci_setup_indirect(hose, (int) &pci->cfg_addr, (int) &pci->cfg_data);
+
+ fsl_pci_init(hose);
+
+ first_free_busno=hose->last_busno+1;
+ printf (" PCI-EXPRESS 1 on bus %02x - %02x\n",
+ hose->first_busno,hose->last_busno);
+
+ /*
+ * Activate ULI1575 legacy chip by performing a fake
+ * memory access. Needed to make ULI RTC work.
+ */
+ in_be32((unsigned *) CFG_PCI1_MEM_BASE
+ + CFG_PCI1_MEM_SIZE - 0x1000000);
+
+ } else {
+ puts("PCI-EXPRESS 1: Disabled\n");
+ }
+}
+#else
+ puts("PCI-EXPRESS1: Disabled\n");
+#endif /* CONFIG_PCI1 */
+
+#ifdef CONFIG_PCI2
+{
+ volatile ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *) CFG_PCI2_ADDR;
+ extern void fsl_pci_init(struct pci_controller *hose);
+ struct pci_controller *hose = &pci2_hose;
+
+
+ /* inbound */
+ pci_set_region(hose->regions + 0,
+ CFG_PCI_MEMORY_BUS,
+ CFG_PCI_MEMORY_PHYS,
+ CFG_PCI_MEMORY_SIZE,
+ PCI_REGION_MEM | PCI_REGION_MEMORY);
+
+ /* outbound memory */
+ pci_set_region(hose->regions + 1,
+ CFG_PCI2_MEM_BASE,
+ CFG_PCI2_MEM_PHYS,
+ CFG_PCI2_MEM_SIZE,
+ PCI_REGION_MEM);
+
+ /* outbound io */
+ pci_set_region(hose->regions + 2,
+ CFG_PCI2_IO_BASE,
+ CFG_PCI2_IO_PHYS,
+ CFG_PCI2_IO_SIZE,
+ PCI_REGION_IO);
+
+ hose->region_count = 3;
+
+ hose->first_busno=first_free_busno;
+ pci_setup_indirect(hose, (int) &pci->cfg_addr, (int) &pci->cfg_data);
+
+ fsl_pci_init(hose);
+
+ first_free_busno=hose->last_busno+1;
+ printf (" PCI-EXPRESS 2 on bus %02x - %02x\n",
+ hose->first_busno,hose->last_busno);
+}
+#else
+ puts("PCI-EXPRESS 2: Disabled\n");
+#endif /* CONFIG_PCI2 */
- pci_mpc86xx_init(&hose);
-#endif /* CONFIG_PCI */
}
#if defined(CONFIG_OF_FLAT_TREE) && defined(CONFIG_OF_BOARD_SETUP)
diff --git a/board/mpc8641hpcn/sys_eeprom.c b/board/mpc8641hpcn/sys_eeprom.c
index 74e2a3d..7bc663b 100644
--- a/board/mpc8641hpcn/sys_eeprom.c
+++ b/board/mpc8641hpcn/sys_eeprom.c
@@ -68,7 +68,7 @@ int mac_show(void)
mac_data.date[5],
mac_data.date[6]);
for (i = 0; i < 8; i++) {
- sprintf(ethaddr[i],
+ sprintf((char *)ethaddr[i],
"%02x:%02x:%02x:%02x:%02x:%02x",
mac_data.mac[i][0],
mac_data.mac[i][1],
@@ -79,10 +79,10 @@ int mac_show(void)
printf("MAC %d %s\n", i, ethaddr[i]);
}
- setenv("ethaddr", ethaddr[0]);
- setenv("eth1addr", ethaddr[1]);
- setenv("eth2addr", ethaddr[2]);
- setenv("eth3addr", ethaddr[3]);
+ setenv("ethaddr", (char *)ethaddr[0]);
+ setenv("eth1addr", (char *)ethaddr[1]);
+ setenv("eth2addr", (char *)ethaddr[2]);
+ setenv("eth3addr", (char *)ethaddr[3]);
return 0;
}
@@ -236,7 +236,7 @@ int mac_read_from_eeprom(void)
} else {
for (i = 0; i < 4; i++) {
if (memcmp(&mac_data.mac[i], "\0\0\0\0\0\0", 6)) {
- sprintf(ethaddr[i],
+ sprintf((char *)ethaddr[i],
"%02x:%02x:%02x:%02x:%02x:%02x",
mac_data.mac[i][0],
mac_data.mac[i][1],
@@ -244,10 +244,10 @@ int mac_read_from_eeprom(void)
mac_data.mac[i][3],
mac_data.mac[i][4],
mac_data.mac[i][5]);
- sprintf(enetvar,
+ sprintf((char *)enetvar,
i ? "eth%daddr" : "ethaddr",
i);
- setenv(enetvar, ethaddr[i]);
+ setenv((char *)enetvar, (char *)ethaddr[i]);
}
}
}
diff --git a/board/mpc8641hpcn/u-boot.lds b/board/mpc8641hpcn/u-boot.lds
index 34b50e4..e4792ef 100644
--- a/board/mpc8641hpcn/u-boot.lds
+++ b/board/mpc8641hpcn/u-boot.lds
@@ -57,7 +57,6 @@ SECTIONS
cpu/mpc86xx/cpu_init.o (.text)
cpu/mpc86xx/cpu.o (.text)
cpu/mpc86xx/speed.o (.text)
- cpu/mpc86xx/pci.o (.text)
common/dlmalloc.o (.text)
lib_generic/crc32.o (.text)
lib_ppc/extable.o (.text)
diff --git a/board/spc1920/hpi.c b/board/spc1920/hpi.c
index 3c36f79..cd7799b 100644
--- a/board/spc1920/hpi.c
+++ b/board/spc1920/hpi.c
@@ -122,7 +122,9 @@ const uint dsp_table_fast[] =
#define TINY_AUTOINC_BASE_ADDR 0x0
static int hpi_activate(void);
+#if 0
static void hpi_inactivate(void);
+#endif
static void dsp_reset(void);
static int hpi_write_inc(u32 addr, u32 *data, u32 count);
@@ -133,7 +135,9 @@ static u32 hpi_read_noinc(u32 addr);
int hpi_test(void);
static int hpi_write_addr_test(u32 addr);
static int hpi_read_write_test(u32 addr, u32 data);
+#ifdef DO_TINY_TEST
static int hpi_tiny_autoinc_test(void);
+#endif /* DO_TINY_TEST */
#endif /* CONFIG_SPC1920_HPI_TEST */
@@ -185,6 +189,7 @@ static int hpi_activate(void)
return 0;
}
+#if 0
/* turn off the host port interface */
static void hpi_inactivate(void)
{
@@ -200,6 +205,7 @@ static void hpi_inactivate(void)
/* currently always on TBD */
}
+#endif
/* reset the DSP */
static void dsp_reset(void)
@@ -570,6 +576,7 @@ static int hpi_read_write_test(u32 addr, u32 data)
return 0;
}
+#ifdef DO_TINY_TEST
static int hpi_tiny_autoinc_test(void)
{
int i;
@@ -599,5 +606,6 @@ static int hpi_tiny_autoinc_test(void)
}
return 0;
}
+#endif /* DO_TINY_TEST */
#endif /* CONFIG_SPC1920_HPI_TEST */
diff --git a/board/trab/Makefile b/board/trab/Makefile
index 868ca42..fbe1c36 100644
--- a/board/trab/Makefile
+++ b/board/trab/Makefile
@@ -50,7 +50,6 @@ $(LIB): $(obj).depend $(OBJS) $(SOBJS)
$(obj)trab_fkt.srec: $(OBJS_FKT) $(LIB)
$(LD) -g -Ttext $(LOAD_ADDR) -o $(<:.o=) -e trab_fkt $^ $(LIB) \
-L$(obj)../../examples -lstubs \
- -L$(obj)../../lib_generic -lgeneric \
-L$(gcclibdir) -lgcc
$(OBJCOPY) -O srec $(<:.o=) $@