blob: 1d76b32dd7ad22a51c7473c25acea850ee23847c [file] [log] [blame]
wdenk634d2f72004-04-15 23:14:49 +00001
wdenke5cda752004-04-15 23:23:39 +00002These are brief instructions on how to add support for CF adapters to
3custom designed PXA boards. You need to set the parameters in the
wdenk634d2f72004-04-15 23:14:49 +00004config file. This should work for most implementations especially if you
5follow the connections of the standard lubbock. Anyway just the block
wdenke5cda752004-04-15 23:23:39 +00006marked memory configuration should be touched since the other parameters
wdenk634d2f72004-04-15 23:14:49 +00007are imposed by the PXA architecture.
8
Albert Aribaud036c6b42010-08-08 05:17:05 +05309EDIT 2010-07-01: in common/cmd_ide.c, having CONFIG_PXA_PCMCIA defined
10would cause looping on inw()/outw() rather than using insw()/outsw(),
11thus making sure IDE / ATA bytes are properly swapped. This behaviour
12is now controlled by CONFIG_IDE_SWAP_IO, therefore PXA boards with
13PCMCIA should #define CONFIG_IDE_SWAP_IO.
14
15#define CONFIG_IDE_SWAP_IO
16
wdenk634d2f72004-04-15 23:14:49 +000017#define CONFIG_PXA_PCMCIA 1
18#define CONFIG_PXA_IDE 1
19
wdenke5cda752004-04-15 23:23:39 +000020#define CONFIG_PCMCIA_SLOT_A 1
wdenk634d2f72004-04-15 23:14:49 +000021/* just to keep build system happy */
22
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020023#define CONFIG_SYS_PCMCIA_MEM_ADDR 0x28000000
24#define CONFIG_SYS_PCMCIA_MEM_SIZE 0x10000000
wdenk634d2f72004-04-15 23:14:49 +000025
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020026#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
wdenk634d2f72004-04-15 23:14:49 +000033/* memory configuration */
34
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020035#define CONFIG_SYS_IDE_MAXBUS 1
wdenk634d2f72004-04-15 23:14:49 +000036/* max. 1 IDE bus */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020037#define CONFIG_SYS_IDE_MAXDEVICE 1
wdenk634d2f72004-04-15 23:14:49 +000038/* max. 1 drive per IDE bus */
39
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020040#define CONFIG_SYS_ATA_IDE0_OFFSET 0x0000
wdenk634d2f72004-04-15 23:14:49 +000041
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020042#define CONFIG_SYS_ATA_BASE_ADDR 0x20000000
wdenk634d2f72004-04-15 23:14:49 +000043
44/* Offset for data I/O */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020045#define CONFIG_SYS_ATA_DATA_OFFSET 0x1f0
wdenk634d2f72004-04-15 23:14:49 +000046
47/* Offset for normal register accesses */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020048#define CONFIG_SYS_ATA_REG_OFFSET 0x1f0
wdenk634d2f72004-04-15 23:14:49 +000049
50/* Offset for alternate registers */
Jean-Christophe PLAGNIOL-VILLARD03836942008-10-16 15:01:15 +020051#define CONFIG_SYS_ATA_ALT_OFFSET 0x3f0
wdenk634d2f72004-04-15 23:14:49 +000052
wdenke5cda752004-04-15 23:23:39 +000053
54Another important point is that maybe you have to power the pcmcia
wdenk634d2f72004-04-15 23:14:49 +000055subsystem. This is very board specific, for an example on how to
56do it please search for CONFIG_EXADRON1 in cmd_pcmcia.c