]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - board/spc1920/hpi.c
rename CFG_ macros to CONFIG_SYS
[people/ms/u-boot.git] / board / spc1920 / hpi.c
index 3c36f7911bc216b8ff18cb57939d93669bb3c9b3..26d0f9c33dce65dd05dc994d21609753cba1410a 100644 (file)
@@ -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,23 +135,25 @@ 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 */
 
 
 /* init the host port interface on UPMA */
 int hpi_init(void)
 {
-       volatile immap_t *immr = (immap_t *) CFG_IMMR;
+       volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR;
        volatile memctl8xx_t *memctl = &immr->im_memctl;
-       volatile spc1920_pld_t *pld = (spc1920_pld_t *) CFG_SPC1920_PLD_BASE;
+       volatile spc1920_pld_t *pld = (spc1920_pld_t *) CONFIG_SYS_SPC1920_PLD_BASE;
 
        upmconfig(UPMA, (uint *)dsp_table_slow, sizeof(dsp_table_slow)/sizeof(uint));
        udelay(100);
 
-       memctl->memc_mamr = CFG_MAMR;
-       memctl->memc_or3 = CFG_OR3;
-       memctl->memc_br3 = CFG_BR3;
+       memctl->memc_mamr = CONFIG_SYS_MAMR;
+       memctl->memc_or3 = CONFIG_SYS_OR3;
+       memctl->memc_br3 = CONFIG_SYS_BR3;
 
        /* reset dsp */
        dsp_reset();
@@ -166,7 +170,7 @@ int hpi_init(void)
 /* activate the Host Port interface */
 static int hpi_activate(void)
 {
-       volatile spc1920_pld_t *pld = (spc1920_pld_t *) CFG_SPC1920_PLD_BASE;
+       volatile spc1920_pld_t *pld = (spc1920_pld_t *) CONFIG_SYS_SPC1920_PLD_BASE;
 
        /* turn on hpi */
        pld->dsp_hpi_on = 0x1;
@@ -185,10 +189,11 @@ static int hpi_activate(void)
        return 0;
 }
 
+#if 0
 /* turn off the host port interface */
 static void hpi_inactivate(void)
 {
-       volatile spc1920_pld_t *pld = (spc1920_pld_t *) CFG_SPC1920_PLD_BASE;
+       volatile spc1920_pld_t *pld = (spc1920_pld_t *) CONFIG_SYS_SPC1920_PLD_BASE;
 
        /* deactivate hpi */
        pld->dsp_hpi_on = 0x0;
@@ -200,11 +205,12 @@ static void hpi_inactivate(void)
        /* currently always on TBD */
 
 }
+#endif
 
 /* reset the DSP */
 static void dsp_reset(void)
 {
-       volatile spc1920_pld_t *pld = (spc1920_pld_t *) CFG_SPC1920_PLD_BASE;
+       volatile spc1920_pld_t *pld = (spc1920_pld_t *) CONFIG_SYS_SPC1920_PLD_BASE;
        pld->dsp_reset = 0x1;
        pld->dsp_hpi_on = 0x0;
 
@@ -228,7 +234,8 @@ static int hpi_write_inc(u32 addr, u32 *data, u32 count)
        HPI_HPIA_1 = addr1;
        HPI_HPIA_2 = addr2;
 
-       debugX(4, "writing from data=0x%x to 0x%x\n", data, (data+count));
+       debugX(4, "writing from data=0x%lx to 0x%lx\n",
+               (ulong)data, (ulong)(data+count));
 
        for(i=0; i<count; i++) {
                HPI_HPID_INC_1 = (u16) ((data[i] >> 16) & 0xffff);
@@ -570,6 +577,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 +607,6 @@ static int hpi_tiny_autoinc_test(void)
        }
        return 0;
 }
+#endif /* DO_TINY_TEST */
 
 #endif /* CONFIG_SPC1920_HPI_TEST */