Merge 'next' branch
[oweals/u-boot.git] / board / ssv / adnpesc1 / adnpesc1.c
index 2ec3a728d74ea5cb0a5ce9c43e60ecf57d48bd53..9d32741499ee7bf5997caa1a5cbb2a1acfa1d187 100644 (file)
@@ -57,7 +57,7 @@ int checkboard (void)
        return 0;
 }
 
-long int initdram (int board_type)
+phys_size_t initdram (int board_type)
 {
        return (0);
 }
@@ -69,25 +69,24 @@ long int initdram (int board_type)
 
 #define        SPI_RTC_CS_MASK 0x00000001
 
-void spi_rtc_chipsel(int cs)
+int spi_cs_is_valid(unsigned int bus, unsigned int cs)
 {
-       nios_spi_t *spi = (nios_spi_t *)CFG_NIOS_SPIBASE;
+       return bus == 0 && cs == 0;
+}
+
+void spi_cs_activate(struct spi_slave *slave)
+{
+       nios_spi_t *spi = (nios_spi_t *)CONFIG_SYS_NIOS_SPIBASE;
 
-       if (cs)
-               spi->slaveselect = SPI_RTC_CS_MASK;     /* activate (1) */
-       else
-               spi->slaveselect = 0;                   /* deactivate (0) */
+       spi->slaveselect = SPI_RTC_CS_MASK;     /* activate (1) */
 }
 
-/*
- * The SPI command uses this table of functions for controlling the SPI
- * chip selects: it calls the appropriate function to control the SPI
- * chip selects.
- */
-spi_chipsel_type spi_chipsel[] = {
-       spi_rtc_chipsel
-};
-int spi_chipsel_cnt = sizeof(spi_chipsel) / sizeof(spi_chipsel[0]);
+void spi_cs_deactivate(struct spi_slave *slave)
+{
+       nios_spi_t *spi = (nios_spi_t *)CONFIG_SYS_NIOS_SPIBASE;
+
+       spi->slaveselect = 0;                   /* deactivate (0) */
+}
 
 #endif