Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1319
b: refs/heads/master
c: 912490d
h: refs/heads/master
i:
  1317: 0c36fcc
  1315: a587ef9
  1311: d22642a
v: v3
  • Loading branch information
Pierre Ossman authored and Russell King committed May 21, 2005
1 parent f4ef79f commit 4a42629
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3d15e4a32dfa3da45751356e5f47aa04b97370e0
refs/heads/master: 912490db699d83cb3d03570b63df7448677a3f56
5 changes: 4 additions & 1 deletion trunk/drivers/mmc/mmc_block.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,10 @@ static int mmc_blk_probe(struct mmc_card *card)
struct mmc_blk_data *md;
int err;

if (card->csd.cmdclass & ~0x1ff)
/*
* Check that the card supports the command class(es) we need.
*/
if (!(card->csd.cmdclass & CCC_BLOCK_READ))
return -ENODEV;

if (card->csd.read_blkbits < 9) {
Expand Down
17 changes: 5 additions & 12 deletions trunk/drivers/serial/8250.c
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,8 @@ static void autoconfig_16550a(struct uart_8250_port *up)
* from EXCR1. Switch back to bank 0, change it in MCR. Then
* switch back to bank 2, read it from EXCR1 again and check
* it's changed. If so, set baud_base in EXCR2 to 921600. -- dwmw2
* On PowerPC we don't want to change baud_base, as we have
* a number of different divisors. -- Tom Rini
*/
serial_outp(up, UART_LCR, 0);
status1 = serial_in(up, UART_MCR);
Expand All @@ -697,25 +699,16 @@ static void autoconfig_16550a(struct uart_8250_port *up)
serial_outp(up, UART_MCR, status1);

if ((status2 ^ status1) & UART_MCR_LOOP) {
unsigned short quot;

#ifndef CONFIG_PPC
serial_outp(up, UART_LCR, 0xE0);

quot = serial_inp(up, UART_DLM) << 8;
quot += serial_inp(up, UART_DLL);
quot <<= 3;

status1 = serial_in(up, 0x04); /* EXCR1 */
status1 &= ~0xB0; /* Disable LOCK, mask out PRESL[01] */
status1 |= 0x10; /* 1.625 divisor for baud_base --> 921600 */
serial_outp(up, 0x04, status1);

serial_outp(up, UART_DLL, quot & 0xff);
serial_outp(up, UART_DLM, quot >> 8);

serial_outp(up, UART_LCR, 0);

up->port.uartclk = 921600*16;
#endif

up->port.type = PORT_NS16550A;
up->capabilities |= UART_NATSEMI;
return;
Expand Down
27 changes: 27 additions & 0 deletions trunk/include/linux/mmc/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,33 @@ struct _mmc_csd {
#define MMC_VDD_35_36 0x00800000 /* VDD voltage 3.5 ~ 3.6 */
#define MMC_CARD_BUSY 0x80000000 /* Card Power up status bit */

/*
* Card Command Classes (CCC)
*/
#define CCC_BASIC (1<<0) /* (0) Basic protocol functions */
/* (CMD0,1,2,3,4,7,9,10,12,13,15) */
#define CCC_STREAM_READ (1<<1) /* (1) Stream read commands */
/* (CMD11) */
#define CCC_BLOCK_READ (1<<2) /* (2) Block read commands */
/* (CMD16,17,18) */
#define CCC_STREAM_WRITE (1<<3) /* (3) Stream write commands */
/* (CMD20) */
#define CCC_BLOCK_WRITE (1<<4) /* (4) Block write commands */
/* (CMD16,24,25,26,27) */
#define CCC_ERASE (1<<5) /* (5) Ability to erase blocks */
/* (CMD32,33,34,35,36,37,38,39) */
#define CCC_WRITE_PROT (1<<6) /* (6) Able to write protect blocks */
/* (CMD28,29,30) */
#define CCC_LOCK_CARD (1<<7) /* (7) Able to lock down card */
/* (CMD16,CMD42) */
#define CCC_APP_SPEC (1<<8) /* (8) Application specific */
/* (CMD55,56,57,ACMD*) */
#define CCC_IO_MODE (1<<9) /* (9) I/O mode */
/* (CMD5,39,40,52,53) */
#define CCC_SWITCH (1<<10) /* (10) High speed switch */
/* (CMD6,34,35,36,37,50) */
/* (11) Reserved */
/* (CMD?) */

/*
* CSD field definitions
Expand Down
8 changes: 4 additions & 4 deletions trunk/include/linux/spinlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ typedef struct {

#define _spin_trylock_bh(lock) ({preempt_disable(); local_bh_disable(); \
_raw_spin_trylock(lock) ? \
1 : ({preempt_enable_no_resched(); local_bh_enable(); 0;});})
1 : ({preempt_enable(); local_bh_enable(); 0;});})

#define _spin_lock(lock) \
do { \
Expand Down Expand Up @@ -383,15 +383,15 @@ do { \
#define _spin_unlock_bh(lock) \
do { \
_raw_spin_unlock(lock); \
preempt_enable_no_resched(); \
preempt_enable(); \
local_bh_enable(); \
__release(lock); \
} while (0)

#define _write_unlock_bh(lock) \
do { \
_raw_write_unlock(lock); \
preempt_enable_no_resched(); \
preempt_enable(); \
local_bh_enable(); \
__release(lock); \
} while (0)
Expand Down Expand Up @@ -423,8 +423,8 @@ do { \
#define _read_unlock_bh(lock) \
do { \
_raw_read_unlock(lock); \
preempt_enable_no_resched(); \
local_bh_enable(); \
preempt_enable(); \
__release(lock); \
} while (0)

Expand Down
8 changes: 4 additions & 4 deletions trunk/kernel/spinlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ EXPORT_SYMBOL(_spin_unlock_irq);
void __lockfunc _spin_unlock_bh(spinlock_t *lock)
{
_raw_spin_unlock(lock);
preempt_enable_no_resched();
preempt_enable();
local_bh_enable();
}
EXPORT_SYMBOL(_spin_unlock_bh);
Expand All @@ -318,7 +318,7 @@ EXPORT_SYMBOL(_read_unlock_irq);
void __lockfunc _read_unlock_bh(rwlock_t *lock)
{
_raw_read_unlock(lock);
preempt_enable_no_resched();
preempt_enable();
local_bh_enable();
}
EXPORT_SYMBOL(_read_unlock_bh);
Expand All @@ -342,7 +342,7 @@ EXPORT_SYMBOL(_write_unlock_irq);
void __lockfunc _write_unlock_bh(rwlock_t *lock)
{
_raw_write_unlock(lock);
preempt_enable_no_resched();
preempt_enable();
local_bh_enable();
}
EXPORT_SYMBOL(_write_unlock_bh);
Expand All @@ -354,7 +354,7 @@ int __lockfunc _spin_trylock_bh(spinlock_t *lock)
if (_raw_spin_trylock(lock))
return 1;

preempt_enable_no_resched();
preempt_enable();
local_bh_enable();
return 0;
}
Expand Down

0 comments on commit 4a42629

Please sign in to comment.