From 9c393714e683d13b086ba26d60992a6ec2248c76 Mon Sep 17 00:00:00 2001 From: Sekhar Nori Date: Mon, 23 Mar 2009 15:19:27 +0530 Subject: U-Boot: Fix compiler warnings Signed-off-by: Sekhar Nori --- drivers/mtd/spi/spi_flash_internal.h | 3 ++- drivers/spi/davinci_spi.c | 10 ++-------- drivers/spi/davinci_spi.h | 8 ++++---- include/asm-arm/arch-da8xx/hardware.h | 6 ++++-- net/eth.c | 2 +- 5 files changed, 13 insertions(+), 16 deletions(-) diff --git a/drivers/mtd/spi/spi_flash_internal.h b/drivers/mtd/spi/spi_flash_internal.h index 75f5900dc1..2d590c2609 100644 --- a/drivers/mtd/spi/spi_flash_internal.h +++ b/drivers/mtd/spi/spi_flash_internal.h @@ -43,4 +43,5 @@ int spi_flash_read_common(struct spi_flash *flash, const u8 *cmd, /* Manufacturer-specific probe functions */ struct spi_flash *spi_flash_probe_spansion(struct spi_slave *spi, u8 *idcode); struct spi_flash *spi_flash_probe_atmel(struct spi_slave *spi, u8 *idcode); -struct spi_flash *spi_flash_probe_stmicro(struct spi_slave *spi, u8 *idcode); +struct spi_flash *spi_flash_probe_atmel(struct spi_slave *spi, u8 *idcode); +struct spi_flash *spi_flash_probe_winbond(struct spi_slave *spi, u8 *idcode); diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c index ed895212bd..c961a671f7 100644 --- a/drivers/spi/davinci_spi.c +++ b/drivers/spi/davinci_spi.c @@ -47,8 +47,6 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, unsigned int max_hz, unsigned int mode) { struct davinci_spi_slave *ds; - void *regs; - unsigned int fmt0; ds = malloc(sizeof(struct davinci_spi_slave)); if (!ds) @@ -56,7 +54,7 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, ds->slave.bus = bus; ds->slave.cs = cs; - ds->regs = CFG_SPI_BASE; + ds->regs = (void*) CFG_SPI_BASE; ds->freq = max_hz; return &ds->slave; @@ -128,14 +126,10 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, void *din, unsigned long flags) { struct davinci_spi_slave *ds = to_davinci_spi(slave); - unsigned int len_tx; - unsigned int len_rx; unsigned int len; int ret, i; - u32 status; const u8 *txp = dout; u8 *rxp = din; - u8 value, dummy = 0; ret = 0; @@ -238,7 +232,7 @@ static char spirombuf[3]; /* ------------------------------------------------------------------------ * * spirom_status( ) * * ------------------------------------------------------------------------ */ -static unsigned char spi_get_status( ) +static unsigned char spi_get_status(void) { /* Issue read status command */ spirombuf[0] = SPIROM_CMD_RDSR; diff --git a/drivers/spi/davinci_spi.h b/drivers/spi/davinci_spi.h index 0f2b0877ba..16141648ed 100644 --- a/drivers/spi/davinci_spi.h +++ b/drivers/spi/davinci_spi.h @@ -39,8 +39,8 @@ static inline struct davinci_spi_slave *to_davinci_spi(struct spi_slave *slave) return container_of(slave, struct davinci_spi_slave, slave); } -#define spi_readl(as, reg) \ - readl(CFG_SPI_BASE + DAVINCI_SPI_##reg) -#define spi_writel(as, reg, value) \ - writel(value, CFG_SPI_BASE + DAVINCI_SPI_##reg) +#define spi_readl(ds, reg) \ + readl(ds->regs + DAVINCI_SPI_##reg) +#define spi_writel(ds, reg, value) \ + writel(value, ds->regs + DAVINCI_SPI_##reg) diff --git a/include/asm-arm/arch-da8xx/hardware.h b/include/asm-arm/arch-da8xx/hardware.h index e8cb2c4640..877950c6af 100644 --- a/include/asm-arm/arch-da8xx/hardware.h +++ b/include/asm-arm/arch-da8xx/hardware.h @@ -213,14 +213,16 @@ typedef volatile unsigned int dv_reg; typedef volatile unsigned int * dv_reg_p; -static int cpu_is_da830(void) +int clk_get(unsigned int id); + +static inline int cpu_is_da830(void) { unsigned int jtag_id = REG(JTAG_ID_REG); unsigned short part_no = (jtag_id >> 12) & 0xffff; return ((part_no == 0xb7df) ? 1 : 0); } -static int cpu_is_da850(void) +static inline int cpu_is_da850(void) { unsigned int jtag_id = REG(JTAG_ID_REG); unsigned short part_no = (jtag_id >> 12) & 0xffff; diff --git a/net/eth.c b/net/eth.c index 465c20576b..b7ef09f447 100644 --- a/net/eth.c +++ b/net/eth.c @@ -469,7 +469,7 @@ extern int at91rm9200_miiphy_initialize(bd_t *bis); extern int emac4xx_miiphy_initialize(bd_t *bis); extern int mcf52x2_miiphy_initialize(bd_t *bis); extern int ns7520_miiphy_initialize(bd_t *bis); -extern int dm644x_eth_miiphy_initialize(bd_t *bis); +extern int davinci_eth_miiphy_initialize(bd_t *bis); int eth_initialize(bd_t *bis) -- cgit v1.2.3