Commit 54373ede authored by Tony Lindgren's avatar Tony Lindgren

Merge with ../linux-omap-dev

parents ca6c3b1c 387a9783
...@@ -48,15 +48,37 @@ static struct omap_usb_config generic1510_usb_config __initdata = { ...@@ -48,15 +48,37 @@ static struct omap_usb_config generic1510_usb_config __initdata = {
#if defined(CONFIG_ARCH_OMAP16XX) #if defined(CONFIG_ARCH_OMAP16XX)
static struct omap_usb_config generic1610_usb_config __initdata = { static struct omap_usb_config generic1610_usb_config __initdata = {
#ifdef CONFIG_USB_OTG
.otg = 1,
#endif
.register_host = 1, .register_host = 1,
.register_dev = 1, .register_dev = 1,
.hmc_mode = 16, .hmc_mode = 16,
.pins[0] = 6, .pins[0] = 6,
}; };
static struct omap_mmc_config generic_mmc_config __initdata = {
.mmc [0] = {
.enabled = 0,
.wire4 = 0,
.wp_pin = -1,
.power_pin = -1,
.switch_pin = -1,
},
.mmc [1] = {
.enabled = 0,
.wire4 = 0,
.wp_pin = -1,
.power_pin = -1,
.switch_pin = -1,
},
};
#endif #endif
static struct omap_board_config_kernel generic_config[] = { static struct omap_board_config_kernel generic_config[] = {
{ OMAP_TAG_USB, NULL }, { OMAP_TAG_USB, NULL },
{ OMAP_TAG_MMC, &generic_mmc_config },
}; };
static void __init omap_generic_init(void) static void __init omap_generic_init(void)
......
...@@ -142,7 +142,7 @@ static struct clk arm_ck = { ...@@ -142,7 +142,7 @@ static struct clk arm_ck = {
static struct clk armper_ck = { static struct clk armper_ck = {
.name = "armper_ck", .name = "armper_ck",
.parent = &ck_dpll1, .parent = &ck_dpll1,
.flags = CLOCK_IN_OMAP730 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
RATE_CKCTL, RATE_CKCTL,
.enable_reg = ARM_IDLECT2, .enable_reg = ARM_IDLECT2,
.enable_bit = EN_PERCK, .enable_bit = EN_PERCK,
...@@ -386,7 +386,8 @@ static struct clk uart2_ck = { ...@@ -386,7 +386,8 @@ static struct clk uart2_ck = {
.name = "uart2_ck", .name = "uart2_ck",
/* Direct from ULPD, no parent */ /* Direct from ULPD, no parent */
.rate = 12000000, .rate = 12000000,
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | ENABLE_REG_32BIT, .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | ENABLE_REG_32BIT |
ALWAYS_ENABLED,
.enable_reg = MOD_CONF_CTRL_0, .enable_reg = MOD_CONF_CTRL_0,
.enable_bit = 30, /* Chooses between 12MHz and 48MHz */ .enable_bit = 30, /* Chooses between 12MHz and 48MHz */
.set_rate = &set_uart_rate, .set_rate = &set_uart_rate,
...@@ -444,6 +445,15 @@ static struct clk usb_hhc_ck16xx = { ...@@ -444,6 +445,15 @@ static struct clk usb_hhc_ck16xx = {
.enable_bit = 8 /* UHOST_EN */, .enable_bit = 8 /* UHOST_EN */,
}; };
static struct clk usb_dc_ck = {
.name = "usb_dc_ck",
/* Direct from ULPD, no parent */
.rate = 48000000,
.flags = CLOCK_IN_OMAP16XX | RATE_FIXED,
.enable_reg = SOFT_REQ_REG,
.enable_bit = 4,
};
static struct clk mclk_1510 = { static struct clk mclk_1510 = {
.name = "mclk", .name = "mclk",
/* Direct from ULPD, no parent. May be enabled by ext hardware. */ /* Direct from ULPD, no parent. May be enabled by ext hardware. */
...@@ -553,6 +563,7 @@ static struct clk * onchip_clks[] = { ...@@ -553,6 +563,7 @@ static struct clk * onchip_clks[] = {
&uart3_16xx, &uart3_16xx,
&usb_clko, &usb_clko,
&usb_hhc_ck1510, &usb_hhc_ck16xx, &usb_hhc_ck1510, &usb_hhc_ck16xx,
&usb_dc_ck,
&mclk_1510, &mclk_16xx, &mclk_1510, &mclk_16xx,
&bclk_1510, &bclk_16xx, &bclk_1510, &bclk_16xx,
&mmc1_ck, &mmc1_ck,
...@@ -1273,7 +1284,9 @@ static int __init omap_late_clk_reset(void) ...@@ -1273,7 +1284,9 @@ static int __init omap_late_clk_reset(void)
struct clk *p; struct clk *p;
__u32 regval32; __u32 regval32;
omap_writew(0, SOFT_REQ_REG); /* USB_REQ_EN will be disabled later if necessary (usb_dc_ck) */
regval32 = omap_readw(SOFT_REQ_REG) & (1 << 4);
omap_writew(regval32, SOFT_REQ_REG);
omap_writew(0, SOFT_REQ_REG2); omap_writew(0, SOFT_REQ_REG2);
list_for_each_entry(p, &clocks, node) { list_for_each_entry(p, &clocks, node) {
......
...@@ -425,7 +425,7 @@ static int dma_handle_ch(int ch) ...@@ -425,7 +425,7 @@ static int dma_handle_ch(int ch)
dma_chan[ch + 6].saved_csr = csr >> 7; dma_chan[ch + 6].saved_csr = csr >> 7;
csr &= 0x7f; csr &= 0x7f;
} }
if (!csr) if ((csr & 0x3f) == 0)
return 0; return 0;
if (unlikely(dma_chan[ch].dev_id == -1)) { if (unlikely(dma_chan[ch].dev_id == -1)) {
printk(KERN_WARNING "Spurious interrupt from DMA channel %d (CSR %04x)\n", printk(KERN_WARNING "Spurious interrupt from DMA channel %d (CSR %04x)\n",
...@@ -890,11 +890,11 @@ void omap_enable_lcd_dma(void) ...@@ -890,11 +890,11 @@ void omap_enable_lcd_dma(void)
w |= 1 << 8; w |= 1 << 8;
omap_writew(w, OMAP1610_DMA_LCD_CTRL); omap_writew(w, OMAP1610_DMA_LCD_CTRL);
lcd_dma.active = 1;
w = omap_readw(OMAP1610_DMA_LCD_CCR); w = omap_readw(OMAP1610_DMA_LCD_CCR);
w |= 1 << 7; w |= 1 << 7;
omap_writew(w, OMAP1610_DMA_LCD_CCR); omap_writew(w, OMAP1610_DMA_LCD_CCR);
lcd_dma.active = 1;
} }
void omap_setup_lcd_dma(void) void omap_setup_lcd_dma(void)
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <linux/mmc/card.h> #include <linux/mmc/card.h>
#include <linux/mmc/protocol.h> #include <linux/mmc/protocol.h>
#include <linux/mmc/host.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
...@@ -269,6 +270,10 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) ...@@ -269,6 +270,10 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
goto cmd_fail; goto cmd_fail;
} }
/* No need to check card status after a read */
if (rq_data_dir(req) == READ)
goto card_ready;
do { do {
int err; int err;
...@@ -298,6 +303,8 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) ...@@ -298,6 +303,8 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
goto cmd_err; goto cmd_err;
#endif #endif
card_ready:
/* /*
* A block was successfully transferred. * A block was successfully transferred.
*/ */
...@@ -359,6 +366,9 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) ...@@ -359,6 +366,9 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
end_that_request_last(req); end_that_request_last(req);
spin_unlock_irq(&md->lock); spin_unlock_irq(&md->lock);
/* If a command fails, the card might be removed. */
mmc_detect_change(card->host);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment