-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 120147 b: refs/heads/master c: 073da9c h: refs/heads/master i: 120145: b6d71b6 120143: 7877cad v: v3
- Loading branch information
Paul Mundt
committed
Dec 22, 2008
1 parent
ebe3be9
commit 11e1fae
Showing
9 changed files
with
64 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 8c197c3afb4a9026973315cc6a3c189dd8434053 | ||
refs/heads/master: 073da9c0de401e8683b6bc76c008a7e0850045d5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#ifndef __MACH_SE_MRSHPC_H | ||
#define __MACH_SE_MRSHPC_H | ||
|
||
#include <linux/io.h> | ||
|
||
static void __init mrshpc_setup_windows(void) | ||
{ | ||
if ((__raw_readw(MRSHPC_CSR) & 0x000c) != 0) | ||
return; /* Not detected */ | ||
|
||
if ((__raw_readw(MRSHPC_CSR) & 0x0080) == 0) { | ||
__raw_writew(0x0674, MRSHPC_CPWCR); /* Card Vcc is 3.3v? */ | ||
} else { | ||
__raw_writew(0x0678, MRSHPC_CPWCR); /* Card Vcc is 5V */ | ||
} | ||
|
||
/* | ||
* PC-Card window open | ||
* flag == COMMON/ATTRIBUTE/IO | ||
*/ | ||
/* common window open */ | ||
__raw_writew(0x8a84, MRSHPC_MW0CR1); | ||
if((__raw_readw(MRSHPC_CSR) & 0x4000) != 0) | ||
/* common mode & bus width 16bit SWAP = 1*/ | ||
__raw_writew(0x0b00, MRSHPC_MW0CR2); | ||
else | ||
/* common mode & bus width 16bit SWAP = 0*/ | ||
__raw_writew(0x0300, MRSHPC_MW0CR2); | ||
|
||
/* attribute window open */ | ||
__raw_writew(0x8a85, MRSHPC_MW1CR1); | ||
if ((__raw_readw(MRSHPC_CSR) & 0x4000) != 0) | ||
/* attribute mode & bus width 16bit SWAP = 1*/ | ||
__raw_writew(0x0a00, MRSHPC_MW1CR2); | ||
else | ||
/* attribute mode & bus width 16bit SWAP = 0*/ | ||
__raw_writew(0x0200, MRSHPC_MW1CR2); | ||
|
||
/* I/O window open */ | ||
__raw_writew(0x8a86, MRSHPC_IOWCR1); | ||
__raw_writew(0x0008, MRSHPC_CDCR); /* I/O card mode */ | ||
if ((__raw_readw(MRSHPC_CSR) & 0x4000) != 0) | ||
__raw_writew(0x0a00, MRSHPC_IOWCR2); /* bus width 16bit SWAP = 1*/ | ||
else | ||
__raw_writew(0x0200, MRSHPC_IOWCR2); /* bus width 16bit SWAP = 0*/ | ||
|
||
__raw_writew(0x2000, MRSHPC_ICR); | ||
__raw_writeb(0x00, PA_MRSHPC_MW2 + 0x206); | ||
__raw_writeb(0x42, PA_MRSHPC_MW2 + 0x200); | ||
} | ||
|
||
#endif /* __MACH_SE_MRSHPC_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.