summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2009-04-03 22:38:36 +0200
committerWolfgang Denk <wd@denx.de>2009-04-03 22:38:36 +0200
commit0d8cb9c04facc029baf4beee5a7e389be343a915 (patch)
treeeb6e1a1a99dde1e957746f3ea7f0c20ce2e515d9 /drivers
parent3405f38a15eec5092ac47efe0829f10a24491c6e (diff)
parent40587701924aa0afc86b3840421b4cc6de42c748 (diff)
Merge branch 'master' of git://git.denx.de/u-boot-blackfin
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/bfin_sdh.c14
-rw-r--r--drivers/spi/bfin_spi.c18
2 files changed, 20 insertions, 12 deletions
diff --git a/drivers/mmc/bfin_sdh.c b/drivers/mmc/bfin_sdh.c
index 7d6b495f3b..16c9695ba8 100644
--- a/drivers/mmc/bfin_sdh.c
+++ b/drivers/mmc/bfin_sdh.c
@@ -293,7 +293,7 @@ mmc_bwrite(int dev, unsigned long start, lbaint_t blkcnt, const void *buffer)
printf("MMC_CMD_SET_BLOCKLEN failed\n");
goto out;
}
- ret = mmc_cmd(MMC_CMD_WRITE_BLOCK,
+ ret = mmc_cmd(MMC_CMD_WRITE_SINGLE_BLOCK,
start * mmc_blkdev.blksz, resp,
MMC_RSP_R1);
if (ret) {
@@ -462,7 +462,7 @@ static int mmc_init_card(struct mmc_cid *cid, int verbose)
return ret;
}
-int mmc_init(int verbose)
+int mmc_legacy_init(int verbose)
{
__u16 pwr_ctl = 0;
int ret;
@@ -530,16 +530,6 @@ int mmc_init(int verbose)
return 0;
}
-int mmc_read(ulong src, uchar *dst, int size)
-{
- return -ENOSYS;
-}
-
-int mmc_write(uchar *src, ulong dst, int size)
-{
- return -ENOSYS;
-}
-
int mmc2info(ulong addr)
{
return 0;
diff --git a/drivers/spi/bfin_spi.c b/drivers/spi/bfin_spi.c
index 0472c1a72f..bc3394ad59 100644
--- a/drivers/spi/bfin_spi.c
+++ b/drivers/spi/bfin_spi.c
@@ -36,6 +36,11 @@ MAKE_SPI_FUNC(SPI_BAUD, 0x14)
__attribute__((weak))
int spi_cs_is_valid(unsigned int bus, unsigned int cs)
{
+#if defined(__ADSPBF538__) || defined(__ADSPBF539__)
+ /* The SPI1/SPI2 buses are weird ... only 1 CS */
+ if (bus > 0 && cs != 1)
+ return 0;
+#endif
return (cs >= 1 && cs <= 7);
}
@@ -204,6 +209,19 @@ static void spi_portmux(struct spi_slave *slave)
}
bfin_write_PORT_MUX(mux);
bfin_write_PORTF_FER(f_fer);
+#elif defined(__ADSPBF538__) || defined(__ADSPBF539__)
+ u16 fer, pins;
+ if (slave->bus == 1)
+ pins = PD0 | PD1 | PD2 | (slave->cs == 1 ? PD4 : 0);
+ else if (slave->bus == 2)
+ pins = PD5 | PD6 | PD7 | (slave->cs == 1 ? PD9 : 0);
+ else
+ pins = 0;
+ if (pins) {
+ fer = bfin_read_PORTDIO_FER();
+ fer &= ~pins;
+ bfin_write_PORTDIO_FER(fer);
+ }
#elif defined(__ADSPBF54x__)
#define DO_MUX(port, pin) \
mux = ((mux & ~PORT_x_MUX_##pin##_MASK) | PORT_x_MUX_##pin##_FUNC_1); \