diff options
| -rw-r--r-- | arch/m68k/cpu/mcf5445x/cpu_init.c | 31 | ||||
| -rw-r--r-- | arch/m68k/include/asm/m5445x.h | 1 | ||||
| -rw-r--r-- | drivers/mtd/nand/bfin_nand.c | 7 | ||||
| -rw-r--r-- | include/usb.h | 2 | 
4 files changed, 37 insertions, 4 deletions
| diff --git a/arch/m68k/cpu/mcf5445x/cpu_init.c b/arch/m68k/cpu/mcf5445x/cpu_init.c index 8d51d35d6..fdcd18585 100644 --- a/arch/m68k/cpu/mcf5445x/cpu_init.c +++ b/arch/m68k/cpu/mcf5445x/cpu_init.c @@ -185,8 +185,19 @@ int fecpin_setclear(struct eth_device *dev, int setclear)  	struct fec_info_s *info = (struct fec_info_s *)dev->priv;  	if (setclear) { +#ifdef CONFIG_SYS_FEC_NO_SHARED_PHY +		if (info->iobase == CONFIG_SYS_FEC0_IOBASE) +			gpio->par_feci2c |= +			    (GPIO_PAR_FECI2C_MDC0_MDC0 | +			     GPIO_PAR_FECI2C_MDIO0_MDIO0); +		else +			gpio->par_feci2c |= +			    (GPIO_PAR_FECI2C_MDC1_MDC1 | +			     GPIO_PAR_FECI2C_MDIO1_MDIO1); +#else  		gpio->par_feci2c |=  		    (GPIO_PAR_FECI2C_MDC0_MDC0 | GPIO_PAR_FECI2C_MDIO0_MDIO0); +#endif  		if (info->iobase == CONFIG_SYS_FEC0_IOBASE)  			gpio->par_fec |= GPIO_PAR_FEC_FEC0_RMII_GPIO; @@ -196,10 +207,19 @@ int fecpin_setclear(struct eth_device *dev, int setclear)  		gpio->par_feci2c &=  		    ~(GPIO_PAR_FECI2C_MDC0_MDC0 | GPIO_PAR_FECI2C_MDIO0_MDIO0); -		if (info->iobase == CONFIG_SYS_FEC0_IOBASE) +		if (info->iobase == CONFIG_SYS_FEC0_IOBASE) { +#ifdef CONFIG_SYS_FEC_FULL_MII +			gpio->par_fec |= GPIO_PAR_FEC_FEC0_MII; +#else  			gpio->par_fec &= GPIO_PAR_FEC_FEC0_UNMASK; -		else +#endif +		} else { +#ifdef CONFIG_SYS_FEC_FULL_MII +			gpio->par_fec |= GPIO_PAR_FEC_FEC1_MII; +#else  			gpio->par_fec &= GPIO_PAR_FEC_FEC1_UNMASK; +#endif +		}  	}  	return 0;  } @@ -238,6 +258,10 @@ int cfspi_claim_bus(uint bus, uint cs)  		gpio->par_dspi &= ~GPIO_PAR_DSPI_PCS2_PCS2;  		gpio->par_dspi |= GPIO_PAR_DSPI_PCS2_PCS2;  		break; +	case 3: +		gpio->par_dma &= GPIO_PAR_DMA_DACK0_UNMASK; +		gpio->par_dma |= GPIO_PAR_DMA_DACK0_PCS3; +		break;  	case 5:  		gpio->par_dspi &= ~GPIO_PAR_DSPI_PCS5_PCS5;  		gpio->par_dspi |= GPIO_PAR_DSPI_PCS5_PCS5; @@ -264,6 +288,9 @@ void cfspi_release_bus(uint bus, uint cs)  	case 2:  		gpio->par_dspi &= ~GPIO_PAR_DSPI_PCS2_PCS2;  		break; +	case 3: +		gpio->par_dma &= GPIO_PAR_DMA_DACK0_UNMASK; +		break;  	case 5:  		gpio->par_dspi &= ~GPIO_PAR_DSPI_PCS5_PCS5;  		break; diff --git a/arch/m68k/include/asm/m5445x.h b/arch/m68k/include/asm/m5445x.h index dfddde62a..c575b8f4c 100644 --- a/arch/m68k/include/asm/m5445x.h +++ b/arch/m68k/include/asm/m5445x.h @@ -314,6 +314,7 @@  #define GPIO_PAR_DMA_DREQ1_GPIO		(0x00)  #define GPIO_PAR_DMA_DACK0_UNMASK	(0xF3)  #define GPIO_PAR_DMA_DACK0_DACK1	(0x0C) +#define GPIO_PAR_DMA_DACK0_PCS3		(0x08)  #define GPIO_PAR_DMA_DACK0_ULPI_DIR	(0x04)  #define GPIO_PAR_DMA_DACK0_GPIO		(0x00)  #define GPIO_PAR_DMA_DREQ0_DREQ0	(0x01) diff --git a/drivers/mtd/nand/bfin_nand.c b/drivers/mtd/nand/bfin_nand.c index f134ef100..6d3d45019 100644 --- a/drivers/mtd/nand/bfin_nand.c +++ b/drivers/mtd/nand/bfin_nand.c @@ -75,7 +75,7 @@ static void bfin_nfc_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)  int bfin_nfc_devready(struct mtd_info *mtd)  {  	pr_stamp(); -	return (bfin_read_NFC_STAT() & NBUSY ? 1 : 0); +	return (bfin_read_NFC_STAT() & NBUSY) ? 1 : 0;  }  /* @@ -132,6 +132,11 @@ static void bfin_nfc_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len  		bfin_write_NFC_DATA_WR(buf[i]);  	} + +	/* Wait for the buffer to drain before we return */ +	while (!(bfin_read_NFC_STAT() & WB_EMPTY)) +		if (ctrlc()) +			return;  }  /* diff --git a/include/usb.h b/include/usb.h index a1f09d4d7..bc4ccfe15 100644 --- a/include/usb.h +++ b/include/usb.h @@ -259,7 +259,7 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate);   */  /* Create various pipes... */  #define create_pipe(dev,endpoint) \ -		(((dev)->devnum << 8) | (endpoint << 15) | \ +		(((dev)->devnum << 8) | ((endpoint) << 15) | \  		((dev)->speed << 26) | (dev)->maxpacketsize)  #define default_pipe(dev) ((dev)->speed << 26) |