diff options
author | Wolfgang Denk <wd@denx.de> | 2010-07-14 21:54:45 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2010-07-14 21:54:45 +0200 |
commit | cb8f0317295482b1a48802778a6927510cb145ba (patch) | |
tree | 87f8761766953b4886711b9dd2b79bb3872e2f53 /drivers/block/pata_bfin.c | |
parent | 53504a278900939e197d8c35164c27ffee861691 (diff) | |
parent | d013d1a2ec77ffd0752f098212069985024c8661 (diff) | |
download | u-boot-imx-cb8f0317295482b1a48802778a6927510cb145ba.zip u-boot-imx-cb8f0317295482b1a48802778a6927510cb145ba.tar.gz u-boot-imx-cb8f0317295482b1a48802778a6927510cb145ba.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-blackfin
Diffstat (limited to 'drivers/block/pata_bfin.c')
-rw-r--r-- | drivers/block/pata_bfin.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/block/pata_bfin.c b/drivers/block/pata_bfin.c index f16dabe..847c032 100644 --- a/drivers/block/pata_bfin.c +++ b/drivers/block/pata_bfin.c @@ -14,6 +14,7 @@ #include <asm/byteorder.h> #include <asm/io.h> #include <asm/errno.h> +#include <asm/portmux.h> #include <asm/mach-common/bits/pata.h> #include <ata.h> #include <libata.h> @@ -769,19 +770,17 @@ static int bfin_ata_reset_port(struct ata_port *ap) */ static int bfin_config_atapi_gpio(struct ata_port *ap) { - bfin_write_PORTH_FER(bfin_read_PORTH_FER() | 0x4); - bfin_write_PORTH_MUX(bfin_read_PORTH_MUX() & ~0x30); - bfin_write_PORTH_DIR_SET(0x4); - - bfin_write_PORTJ_FER(0x7f8); - bfin_write_PORTJ_MUX(bfin_read_PORTI_MUX() & ~0x3fffc0); - bfin_write_PORTJ_DIR_SET(0x5f8); - bfin_write_PORTJ_DIR_CLEAR(0x200); - bfin_write_PORTJ_INEN(0x200); - - bfin_write_PINT2_ASSIGN(0x0707); - bfin_write_PINT2_MASK_SET(0x200); - SSYNC(); + const unsigned short pins[] = { + P_ATAPI_RESET, P_ATAPI_DIOR, P_ATAPI_DIOW, P_ATAPI_CS0, + P_ATAPI_CS1, P_ATAPI_DMACK, P_ATAPI_DMARQ, P_ATAPI_INTRQ, + P_ATAPI_IORDY, P_ATAPI_D0A, P_ATAPI_D1A, P_ATAPI_D2A, + P_ATAPI_D3A, P_ATAPI_D4A, P_ATAPI_D5A, P_ATAPI_D6A, + P_ATAPI_D7A, P_ATAPI_D8A, P_ATAPI_D9A, P_ATAPI_D10A, + P_ATAPI_D11A, P_ATAPI_D12A, P_ATAPI_D13A, P_ATAPI_D14A, + P_ATAPI_D15A, P_ATAPI_A0A, P_ATAPI_A1A, P_ATAPI_A2A, 0, + }; + + peripheral_request_list(pins, "pata_bfin"); return 0; } |