wdenk | 634d2f7 | 2004-04-15 23:14:49 +0000 | [diff] [blame] | 1 | |
wdenk | e5cda75 | 2004-04-15 23:23:39 +0000 | [diff] [blame] | 2 | These are brief instructions on how to add support for CF adapters to |
| 3 | custom designed PXA boards. You need to set the parameters in the |
wdenk | 634d2f7 | 2004-04-15 23:14:49 +0000 | [diff] [blame] | 4 | config file. This should work for most implementations especially if you |
| 5 | follow the connections of the standard lubbock. Anyway just the block |
wdenk | e5cda75 | 2004-04-15 23:23:39 +0000 | [diff] [blame] | 6 | marked memory configuration should be touched since the other parameters |
wdenk | 634d2f7 | 2004-04-15 23:14:49 +0000 | [diff] [blame] | 7 | are imposed by the PXA architecture. |
| 8 | |
Albert Aribaud | 036c6b4 | 2010-08-08 05:17:05 +0530 | [diff] [blame] | 9 | EDIT 2010-07-01: in common/cmd_ide.c, having CONFIG_PXA_PCMCIA defined |
| 10 | would cause looping on inw()/outw() rather than using insw()/outsw(), |
| 11 | thus making sure IDE / ATA bytes are properly swapped. This behaviour |
| 12 | is now controlled by CONFIG_IDE_SWAP_IO, therefore PXA boards with |
| 13 | PCMCIA should #define CONFIG_IDE_SWAP_IO. |
| 14 | |
| 15 | #define CONFIG_IDE_SWAP_IO |
| 16 | |
wdenk | 634d2f7 | 2004-04-15 23:14:49 +0000 | [diff] [blame] | 17 | #define CONFIG_PXA_PCMCIA 1 |
| 18 | #define CONFIG_PXA_IDE 1 |
| 19 | |
wdenk | e5cda75 | 2004-04-15 23:23:39 +0000 | [diff] [blame] | 20 | #define CONFIG_PCMCIA_SLOT_A 1 |
wdenk | 634d2f7 | 2004-04-15 23:14:49 +0000 | [diff] [blame] | 21 | /* just to keep build system happy */ |
| 22 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 23 | #define CONFIG_SYS_PCMCIA_MEM_ADDR 0x28000000 |
| 24 | #define CONFIG_SYS_PCMCIA_MEM_SIZE 0x10000000 |
wdenk | 634d2f7 | 2004-04-15 23:14:49 +0000 | [diff] [blame] | 25 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 26 | #define CONFIG_SYS_MECR_VAL 0x00000000 |
| 27 | #define CONFIG_SYS_MCMEM0_VAL 0x00004204 |
| 28 | #define CONFIG_SYS_MCMEM1_VAL 0x00000000 |
| 29 | #define CONFIG_SYS_MCATT0_VAL 0x00010504 |
| 30 | #define CONFIG_SYS_MCATT1_VAL 0x00000000 |
| 31 | #define CONFIG_SYS_MCIO0_VAL 0x00008407 |
| 32 | #define CONFIG_SYS_MCIO1_VAL 0x00000000 |
wdenk | 634d2f7 | 2004-04-15 23:14:49 +0000 | [diff] [blame] | 33 | /* memory configuration */ |
| 34 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 35 | #define CONFIG_SYS_IDE_MAXBUS 1 |
wdenk | 634d2f7 | 2004-04-15 23:14:49 +0000 | [diff] [blame] | 36 | /* max. 1 IDE bus */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 37 | #define CONFIG_SYS_IDE_MAXDEVICE 1 |
wdenk | 634d2f7 | 2004-04-15 23:14:49 +0000 | [diff] [blame] | 38 | /* max. 1 drive per IDE bus */ |
| 39 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 40 | #define CONFIG_SYS_ATA_IDE0_OFFSET 0x0000 |
wdenk | 634d2f7 | 2004-04-15 23:14:49 +0000 | [diff] [blame] | 41 | |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 42 | #define CONFIG_SYS_ATA_BASE_ADDR 0x20000000 |
wdenk | 634d2f7 | 2004-04-15 23:14:49 +0000 | [diff] [blame] | 43 | |
| 44 | /* Offset for data I/O */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 45 | #define CONFIG_SYS_ATA_DATA_OFFSET 0x1f0 |
wdenk | 634d2f7 | 2004-04-15 23:14:49 +0000 | [diff] [blame] | 46 | |
| 47 | /* Offset for normal register accesses */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 48 | #define CONFIG_SYS_ATA_REG_OFFSET 0x1f0 |
wdenk | 634d2f7 | 2004-04-15 23:14:49 +0000 | [diff] [blame] | 49 | |
| 50 | /* Offset for alternate registers */ |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 51 | #define CONFIG_SYS_ATA_ALT_OFFSET 0x3f0 |
wdenk | 634d2f7 | 2004-04-15 23:14:49 +0000 | [diff] [blame] | 52 | |
wdenk | e5cda75 | 2004-04-15 23:23:39 +0000 | [diff] [blame] | 53 | |
| 54 | Another important point is that maybe you have to power the pcmcia |
wdenk | 634d2f7 | 2004-04-15 23:14:49 +0000 | [diff] [blame] | 55 | subsystem. This is very board specific, for an example on how to |
| 56 | do it please search for CONFIG_EXADRON1 in cmd_pcmcia.c |