bf537-stamp.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494
  1. /*
  2. * U-boot - Configuration file for BF537 STAMP board
  3. */
  4. #ifndef __CONFIG_BF537_H__
  5. #define __CONFIG_BF537_H__
  6. #include <asm/blackfin-config-pre.h>
  7. #define CFG_LONGHELP 1
  8. #define CONFIG_CMDLINE_EDITING 1
  9. #define CONFIG_BAUDRATE 57600
  10. /* Set default serial console for bf537 */
  11. #define CONFIG_UART_CONSOLE 0
  12. #define CONFIG_BF537 1
  13. #define CONFIG_BOOTDELAY 5
  14. /* define CONFIG_BF537_STAMP_LEDCMD to enable LED command*/
  15. /*#define CONFIG_BF537_STAMP_LEDCMD 1*/
  16. /*
  17. * Boot Mode Set
  18. * Blackfin can support several boot modes
  19. */
  20. #define BF537_BYPASS_BOOT 0x0011 /* Bootmode 0: Execute from 16-bit externeal memory ( bypass BOOT ROM) */
  21. #define BF537_PARA_BOOT 0x0012 /* Bootmode 1: Boot from 8-bit or 16-bit flash */
  22. #define BF537_SPI_MASTER_BOOT 0x0014 /* Bootmode 3: SPI master mode boot from SPI flash */
  23. #define BF537_SPI_SLAVE_BOOT 0x0015 /* Bootmode 4: SPI slave mode boot from SPI flash */
  24. #define BF537_TWI_MASTER_BOOT 0x0016 /* Bootmode 5: TWI master mode boot from EEPROM */
  25. #define BF537_TWI_SLAVE_BOOT 0x0017 /* Bootmode 6: TWI slave mode boot from EEPROM */
  26. #define BF537_UART_BOOT 0x0018 /* Bootmode 7: UART slave mdoe boot via UART host */
  27. /* Define the boot mode */
  28. #define BFIN_BOOT_MODE BF537_BYPASS_BOOT
  29. #define CONFIG_PANIC_HANG 1
  30. #define CONFIG_BFIN_CPU bf537-0.2
  31. #define CONFIG_BFIN_MAC
  32. /* This sets the default state of the cache on U-Boot's boot */
  33. #define CONFIG_ICACHE_ON
  34. #define CONFIG_DCACHE_ON
  35. /* Define if want to do post memory test */
  36. #undef CONFIG_POST_TEST
  37. /* Define where the uboot will be loaded by on-chip boot rom */
  38. #define APP_ENTRY 0x00001000
  39. #define CONFIG_RTC_BFIN 1
  40. #define CONFIG_BOOT_RETRY_TIME -1 /* Enable this if bootretry required, currently its disabled */
  41. /* CONFIG_CLKIN_HZ is any value in Hz */
  42. #define CONFIG_CLKIN_HZ 25000000
  43. /* CONFIG_CLKIN_HALF controls what is passed to PLL 0=CLKIN */
  44. /* 1=CLKIN/2 */
  45. #define CONFIG_CLKIN_HALF 0
  46. /* CONFIG_PLL_BYPASS controls if the PLL is used 0=don't bypass */
  47. /* 1=bypass PLL*/
  48. #define CONFIG_PLL_BYPASS 0
  49. /* CONFIG_VCO_MULT controls what the multiplier of the PLL is. */
  50. /* Values can range from 1-64 */
  51. #define CONFIG_VCO_MULT 20
  52. /* CONFIG_CCLK_DIV controls what the core clock divider is */
  53. /* Values can be 1, 2, 4, or 8 ONLY */
  54. #define CONFIG_CCLK_DIV 1
  55. /* CONFIG_SCLK_DIV controls what the peripheral clock divider is*/
  56. /* Values can range from 1-15 */
  57. #define CONFIG_SCLK_DIV 5
  58. /* CONFIG_SPI_BAUD controls the SPI peripheral clock divider */
  59. /* Values can range from 2-65535 */
  60. /* SCK Frequency = SCLK / (2 * CONFIG_SPI_BAUD) */
  61. #define CONFIG_SPI_BAUD 2
  62. #if (BFIN_BOOT_MODE == BF537_SPI_MASTER_BOOT)
  63. #define CONFIG_SPI_BAUD_INITBLOCK 4
  64. #endif
  65. #if ( CONFIG_CLKIN_HALF == 0 )
  66. #define CONFIG_VCO_HZ ( CONFIG_CLKIN_HZ * CONFIG_VCO_MULT )
  67. #else
  68. #define CONFIG_VCO_HZ (( CONFIG_CLKIN_HZ * CONFIG_VCO_MULT ) / 2 )
  69. #endif
  70. #if (CONFIG_PLL_BYPASS == 0)
  71. #define CONFIG_CCLK_HZ ( CONFIG_VCO_HZ / CONFIG_CCLK_DIV )
  72. #define CONFIG_SCLK_HZ ( CONFIG_VCO_HZ / CONFIG_SCLK_DIV )
  73. #else
  74. #define CONFIG_CCLK_HZ CONFIG_CLKIN_HZ
  75. #define CONFIG_SCLK_HZ CONFIG_CLKIN_HZ
  76. #endif
  77. #if (BFIN_BOOT_MODE == BF537_SPI_MASTER_BOOT)
  78. #if (CONFIG_SCLK_HZ / (2*CONFIG_SPI_BAUD) > 20000000)
  79. #define CONFIG_SPI_FLASH_FAST_READ 1 /* Needed if SPI_CLK > 20 MHz */
  80. #else
  81. #undef CONFIG_SPI_FLASH_FAST_READ
  82. #endif
  83. #endif
  84. #define CONFIG_MEM_SIZE 64 /* 128, 64, 32, 16 */
  85. #define CONFIG_MEM_ADD_WDTH 10 /* 8, 9, 10, 11 */
  86. #define CONFIG_MEM_MT48LC32M8A2_75 1
  87. #define CONFIG_LOADS_ECHO 1
  88. /*
  89. * rarpb, bootp or dhcp commands will perform only a
  90. * configuration lookup from the BOOTP/DHCP server
  91. * but not try to load any image using TFTP
  92. */
  93. #define CFG_AUTOLOAD "no"
  94. /*
  95. * Network Settings
  96. */
  97. /* network support */
  98. #ifdef CONFIG_BFIN_MAC
  99. #define CONFIG_IPADDR 192.168.0.15
  100. #define CONFIG_NETMASK 255.255.255.0
  101. #define CONFIG_GATEWAYIP 192.168.0.1
  102. #define CONFIG_SERVERIP 192.168.0.2
  103. #define CONFIG_HOSTNAME BF537
  104. #endif
  105. #define CONFIG_ROOTPATH /romfs
  106. /* Uncomment next line to use fixed MAC address */
  107. /* #define CONFIG_ETHADDR 02:80:ad:20:31:e8 */
  108. /* This is the routine that copies the MAC in Flash to the 'ethaddr' setting */
  109. #define CFG_LONGHELP 1
  110. #define CONFIG_BOOTDELAY 5
  111. #define CONFIG_BOOT_RETRY_TIME -1 /* Enable this if bootretry required, currently its disabled */
  112. #define CONFIG_BOOTCOMMAND "run ramboot"
  113. #if (BFIN_BOOT_MODE == BF537_BYPASS_BOOT) && defined(CONFIG_POST_TEST)
  114. /* POST support */
  115. #define CONFIG_POST ( CFG_POST_MEMORY | \
  116. CFG_POST_UART | \
  117. CFG_POST_FLASH | \
  118. CFG_POST_ETHER | \
  119. CFG_POST_LED | \
  120. CFG_POST_BUTTON)
  121. #else
  122. #undef CONFIG_POST
  123. #endif
  124. #ifdef CONFIG_POST
  125. #define FLASH_START_POST_BLOCK 11 /* Should > = 11 */
  126. #define FLASH_END_POST_BLOCK 71 /* Should < = 71 */
  127. #endif
  128. /* CF-CARD IDE-HDD Support */
  129. /* #define CONFIG_BFIN_TRUE_IDE */ /* Add CF flash card support */
  130. /* #define CONFIG_BFIN_CF_IDE */ /* Add CF flash card support */
  131. /* #define CONFIG_BFIN_HDD_IDE */ /* Add IDE Disk Drive (HDD) support */
  132. #if defined(CONFIG_BFIN_CF_IDE) || defined(CONFIG_BFIN_HDD_IDE) || defined(CONFIG_BFIN_TRUE_IDE)
  133. # define CONFIG_BFIN_IDE 1
  134. #endif
  135. /*#define CONFIG_BF537_NAND */ /* Add nand flash support */
  136. #define CONFIG_NETCONSOLE 1
  137. #define CONFIG_NET_MULTI 1
  138. /*
  139. * BOOTP options
  140. */
  141. #define CONFIG_BOOTP_BOOTFILESIZE
  142. #define CONFIG_BOOTP_BOOTPATH
  143. #define CONFIG_BOOTP_GATEWAY
  144. #define CONFIG_BOOTP_HOSTNAME
  145. /*
  146. * Command line configuration.
  147. */
  148. #include <config_cmd_default.h>
  149. #if (BFIN_BOOT_MODE == BF537_BYPASS_BOOT) || (BFIN_BOOT_MODE == BF537_SPI_MASTER_BOOT)
  150. #define CONFIG_CMD_ELF
  151. #define CONFIG_CMD_I2C
  152. #define CONFIG_CMD_CACHE
  153. #define CONFIG_CMD_JFFS2
  154. #define CONFIG_CMD_EEPROM
  155. #define CONFIG_CMD_DATE
  156. #ifndef CONFIG_BFIN_MAC
  157. #undef CONFIG_CMD_NET
  158. #else
  159. #define CONFIG_CMD_PING
  160. #endif
  161. #if defined(CONFIG_BFIN_CF_IDE) \
  162. || defined(CONFIG_BFIN_HDD_IDE) \
  163. || defined(CONFIG_BFIN_TRUE_IDE)
  164. #define CONFIG_CMD_IDE
  165. #endif
  166. #endif
  167. #if (BFIN_BOOT_MODE == BF537_BYPASS_BOOT)
  168. #define CONFIG_CMD_DHCP
  169. #if defined(CONFIG_POST)
  170. #define CONFIG_CMD_DIAG
  171. #endif
  172. #ifdef CONFIG_BF537_NAND
  173. #define CONFIG_CMD_NAND
  174. #endif
  175. #endif
  176. #define CONFIG_BOOTARGS "root=/dev/mtdblock0 rw console=ttyBF0,57600"
  177. #define CONFIG_LOADADDR 0x1000000
  178. #if (BFIN_BOOT_MODE == BF537_BYPASS_BOOT)
  179. #ifdef CONFIG_BFIN_MAC
  180. #define CONFIG_EXTRA_ENV_SETTINGS \
  181. "ramargs=setenv bootargs root=/dev/mtdblock0 rw console=ttyBF0,57600\0" \
  182. "nfsargs=setenv bootargs root=/dev/nfs rw " \
  183. "nfsroot=$(serverip):$(rootpath) console=ttyBF0,57600\0"\
  184. "addip=setenv bootargs $(bootargs) " \
  185. "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask)" \
  186. ":$(hostname):eth0:off\0" \
  187. "ramboot=tftpboot $(loadaddr) linux;" \
  188. "run ramargs;run addip;bootelf\0" \
  189. "nfsboot=tftpboot $(loadaddr) linux;" \
  190. "run nfsargs;run addip;bootelf\0" \
  191. "flashboot=bootm 0x20100000\0" \
  192. "update=tftpboot $(loadaddr) u-boot.bin;" \
  193. "protect off 0x20000000 0x2007FFFF;" \
  194. "erase 0x20000000 0x2007FFFF;cp.b 0x1000000 0x20000000 $(filesize)\0" \
  195. ""
  196. #else
  197. #define CONFIG_EXTRA_ENV_SETTINGS \
  198. "ramargs=setenv bootargs root=/dev/mtdblock0 rw console=ttyBF0,57600\0" \
  199. "flashboot=bootm 0x20100000\0" \
  200. ""
  201. #endif
  202. #elif (BFIN_BOOT_MODE == BF537_SPI_MASTER_BOOT)
  203. #ifdef CONFIG_BFIN_MAC
  204. #define CONFIG_EXTRA_ENV_SETTINGS \
  205. "ramargs=setenv bootargs root=/dev/mtdblock0 rw console=ttyBF0,57600\0" \
  206. "nfsargs=setenv bootargs root=/dev/nfs rw " \
  207. "nfsroot=$(serverip):$(rootpath) console=ttyBF0,57600\0"\
  208. "addip=setenv bootargs $(bootargs) " \
  209. "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask)" \
  210. ":$(hostname):eth0:off\0" \
  211. "ramboot=tftpboot $(loadaddr) linux;" \
  212. "run ramargs;run addip;bootelf\0" \
  213. "nfsboot=tftpboot $(loadaddr) linux;" \
  214. "run nfsargs;run addip;bootelf\0" \
  215. "flashboot=bootm 0x20100000\0" \
  216. "update=tftpboot $(loadaddr) u-boot.ldr;" \
  217. "eeprom write $(loadaddr) 0x0 $(filesize);\0" \
  218. ""
  219. #else
  220. #define CONFIG_EXTRA_ENV_SETTINGS \
  221. "ramargs=setenv bootargs root=/dev/mtdblock0 rw console=ttyBF0,57600\0" \
  222. "flashboot=bootm 0x20100000\0" \
  223. ""
  224. #endif
  225. #endif
  226. #define CFG_PROMPT "bfin> " /* Monitor Command Prompt */
  227. #if defined(CONFIG_CMD_KGDB)
  228. #define CFG_CBSIZE 1024 /* Console I/O Buffer Size */
  229. #else
  230. #define CFG_CBSIZE 256 /* Console I/O Buffer Size */
  231. #endif
  232. #define CFG_MAX_RAM_SIZE (CONFIG_MEM_SIZE * 1024*1024)
  233. #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
  234. #define CFG_MAXARGS 16 /* max number of command args */
  235. #define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
  236. #define CFG_MEMTEST_START 0x0 /* memtest works on */
  237. #define CFG_MEMTEST_END ( (CONFIG_MEM_SIZE - 1) * 1024*1024) /* 1 ... 63 MB in DRAM */
  238. #define CFG_LOAD_ADDR CONFIG_LOADADDR /* default load address */
  239. #define CFG_HZ 1000 /* decrementer freq: 10 ms ticks */
  240. #define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
  241. #define CFG_SDRAM_BASE 0x00000000
  242. #define CFG_FLASH_BASE 0x20000000
  243. #define CFG_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */
  244. #define CFG_MONITOR_BASE (CFG_MAX_RAM_SIZE - CFG_MONITOR_LEN)
  245. #define CFG_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */
  246. #define CFG_MALLOC_BASE (CFG_MONITOR_BASE - CFG_MALLOC_LEN)
  247. #define CFG_GBL_DATA_SIZE 0x4000
  248. #define CFG_GBL_DATA_ADDR (CFG_MALLOC_BASE - CFG_GBL_DATA_SIZE)
  249. #define CONFIG_STACKBASE (CFG_GBL_DATA_ADDR - 4)
  250. #define CFG_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */
  251. #define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */
  252. #define CFG_MAX_FLASH_SECT 71 /* max number of sectors on one chip */
  253. #if (BFIN_BOOT_MODE == BF537_BYPASS_BOOT) || (BFIN_BOOT_MODE == BF537_UART_BOOT)
  254. /* for bf537-stamp, usrt boot mode still store env in flash */
  255. #define CFG_ENV_IS_IN_FLASH 1
  256. #define CFG_ENV_ADDR 0x20004000
  257. #define CFG_ENV_OFFSET (CFG_ENV_ADDR - CFG_FLASH_BASE)
  258. #elif (BFIN_BOOT_MODE == BF537_SPI_MASTER_BOOT)
  259. #define CFG_ENV_IS_IN_EEPROM 1
  260. #define CFG_ENV_OFFSET 0x4000
  261. #define CFG_ENV_HEADER (CFG_ENV_OFFSET + 0x16e) /* 0x12A is the length of LDR file header */
  262. #endif
  263. #define CFG_ENV_SIZE 0x2000
  264. #define CFG_ENV_SECT_SIZE 0x2000 /* Total Size of Environment Sector */
  265. /* #if (BFIN_BOOT_MODE == BF537_BYPASS_BOOT) */
  266. #define ENV_IS_EMBEDDED
  267. /* #endif */
  268. /* JFFS Partition offset set */
  269. #define CFG_JFFS2_FIRST_BANK 0
  270. #define CFG_JFFS2_NUM_BANKS 1
  271. /* 512k reserved for u-boot */
  272. #define CFG_JFFS2_FIRST_SECTOR 15
  273. #define CONFIG_SPI
  274. /*
  275. * Stack sizes
  276. */
  277. #define CONFIG_STACKSIZE (128*1024) /* regular stack */
  278. #define POLL_MODE 1
  279. #define FLASH_TOT_SECT 71
  280. #define FLASH_SIZE 0x400000
  281. #define CFG_FLASH_SIZE 0x400000
  282. /*
  283. * Board NAND Infomation
  284. */
  285. #define CFG_NAND_ADDR 0x20212000
  286. #define CFG_NAND_BASE CFG_NAND_ADDR
  287. #define CFG_MAX_NAND_DEVICE 1
  288. #define SECTORSIZE 512
  289. #define ADDR_COLUMN 1
  290. #define ADDR_PAGE 2
  291. #define ADDR_COLUMN_PAGE 3
  292. #define NAND_ChipID_UNKNOWN 0x00
  293. #define NAND_MAX_FLOORS 1
  294. #define NAND_MAX_CHIPS 1
  295. #define BFIN_NAND_READY PF3
  296. #define NAND_WAIT_READY(nand) \
  297. do { \
  298. int timeout = 0; \
  299. while(!(*pPORTFIO & PF3)) \
  300. if (timeout++ > 100000) \
  301. break; \
  302. } while (0)
  303. #define BFIN_NAND_CLE (1<<2) /* A2 -> Command Enable */
  304. #define BFIN_NAND_ALE (1<<1) /* A1 -> Address Enable */
  305. #define WRITE_NAND_COMMAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr | BFIN_NAND_CLE) = (__u8)(d); } while(0)
  306. #define WRITE_NAND_ADDRESS(d, adr) do{ *(volatile __u8 *)((unsigned long)adr | BFIN_NAND_ALE) = (__u8)(d); } while(0)
  307. #define WRITE_NAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)d; } while(0)
  308. #define READ_NAND(adr) ((volatile unsigned char)(*(volatile __u8 *)(unsigned long)adr))
  309. /*
  310. * Initialize PSD4256 registers for using I2C
  311. */
  312. #define CONFIG_MISC_INIT_R
  313. #define CFG_BOOTM_LEN 0x4000000 /* Large Image Length, set to 64 Meg */
  314. /*
  315. * I2C settings
  316. * By default PF1 is used as SDA and PF0 as SCL on the Stamp board
  317. */
  318. /* #define CONFIG_SOFT_I2C 1*/ /* I2C bit-banged */
  319. #define CONFIG_HARD_I2C 1 /* I2C TWI */
  320. #if defined CONFIG_HARD_I2C
  321. #define CONFIG_TWICLK_KHZ 50
  322. #endif
  323. #if defined CONFIG_SOFT_I2C
  324. /*
  325. * Software (bit-bang) I2C driver configuration
  326. */
  327. #define PF_SCL PF0
  328. #define PF_SDA PF1
  329. #define I2C_INIT (*pFIO_DIR |= PF_SCL); asm("ssync;")
  330. #define I2C_ACTIVE (*pFIO_DIR |= PF_SDA); *pFIO_INEN &= ~PF_SDA; asm("ssync;")
  331. #define I2C_TRISTATE (*pFIO_DIR &= ~PF_SDA); *pFIO_INEN |= PF_SDA; asm("ssync;")
  332. #define I2C_READ ((volatile)(*pFIO_FLAG_D & PF_SDA) != 0); asm("ssync;")
  333. #define I2C_SDA(bit) if(bit) { \
  334. *pFIO_FLAG_S = PF_SDA; \
  335. asm("ssync;"); \
  336. } \
  337. else { \
  338. *pFIO_FLAG_C = PF_SDA; \
  339. asm("ssync;"); \
  340. }
  341. #define I2C_SCL(bit) if(bit) { \
  342. *pFIO_FLAG_S = PF_SCL; \
  343. asm("ssync;"); \
  344. } \
  345. else { \
  346. *pFIO_FLAG_C = PF_SCL; \
  347. asm("ssync;"); \
  348. }
  349. #define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */
  350. #endif
  351. #define CFG_I2C_SPEED 50000
  352. #define CFG_I2C_SLAVE 0xFE
  353. /* 0xFF, 0x7BB07BB0, 0x22547BB0 */
  354. /* #define AMGCTLVAL (AMBEN_P0 | AMBEN_P1 | AMBEN_P2 | AMCKEN)
  355. #define AMBCTL0VAL (B1WAT_7 | B1RAT_11 | B1HT_2 | B1ST_3 | B1TT_4 | ~B1RDYPOL | \
  356. ~B1RDYEN | B0WAT_7 | B0RAT_11 | B0HT_2 | B0ST_3 | B0TT_4 | ~B0RDYPOL | ~B0RDYEN)
  357. #define AMBCTL1VAL (B3WAT_2 | B3RAT_2 | B3HT_1 | B3ST_1 | B3TT_4 | B3RDYPOL | ~B3RDYEN | \
  358. B2WAT_7 | B2RAT_11 | B2HT_2 | B2ST_3 | B2TT_4 | ~B2RDYPOL | ~B2RDYEN)
  359. */
  360. #define AMGCTLVAL 0xFF
  361. #define AMBCTL0VAL 0x7BB07BB0
  362. #define AMBCTL1VAL 0xFFC27BB0
  363. #define CONFIG_VDSP 1
  364. #ifdef CONFIG_VDSP
  365. #define ET_EXEC_VDSP 0x8
  366. #define SHT_STRTAB_VDSP 0x1
  367. #define ELFSHDRSIZE_VDSP 0x2C
  368. #define VDSP_ENTRY_ADDR 0xFFA00000
  369. #endif
  370. #if defined(CONFIG_BFIN_IDE)
  371. #define CONFIG_DOS_PARTITION 1
  372. /*
  373. * IDE/ATA stuff
  374. */
  375. #undef CONFIG_IDE_8xx_DIRECT /* no pcmcia interface required */
  376. #undef CONFIG_IDE_LED /* no led for ide supported */
  377. #undef CONFIG_IDE_RESET /* no reset for ide supported */
  378. #define CFG_IDE_MAXBUS 1 /* max. 1 IDE busses */
  379. #define CFG_IDE_MAXDEVICE (CFG_IDE_MAXBUS*1) /* max. 1 drives per IDE bus */
  380. #undef AMBCTL1VAL
  381. #define AMBCTL1VAL 0xFFC3FFC3
  382. #define CONFIG_CF_ATASEL_DIS 0x20311800
  383. #define CONFIG_CF_ATASEL_ENA 0x20311802
  384. #if defined(CONFIG_BFIN_TRUE_IDE)
  385. /*
  386. * Note that these settings aren't for the most part used in include/ata.h
  387. * when all of the ATA registers are setup
  388. */
  389. #define CFG_ATA_BASE_ADDR 0x2031C000
  390. #define CFG_ATA_IDE0_OFFSET 0x0000
  391. #define CFG_ATA_DATA_OFFSET 0x0020 /* Offset for data I/O */
  392. #define CFG_ATA_REG_OFFSET 0x0020 /* Offset for normal register accesses */
  393. #define CFG_ATA_ALT_OFFSET 0x001C /* Offset for alternate registers */
  394. #define CFG_ATA_STRIDE 2 /* CF.A0 --> Blackfin.Ax */
  395. #endif /* CONFIG_BFIN_TRUE_IDE */
  396. #if defined(CONFIG_BFIN_CF_IDE) /* USE CompactFlash Storage Card in the common memory space */
  397. #define CFG_ATA_BASE_ADDR 0x20211800
  398. #define CFG_ATA_IDE0_OFFSET 0x0000
  399. #define CFG_ATA_DATA_OFFSET 0x0000 /* Offset for data I/O */
  400. #define CFG_ATA_REG_OFFSET 0x0000 /* Offset for normal register accesses */
  401. #define CFG_ATA_ALT_OFFSET 0x000E /* Offset for alternate registers */
  402. #define CFG_ATA_STRIDE 1 /* CF.A0 --> Blackfin.Ax */
  403. #endif /* CONFIG_BFIN_CF_IDE */
  404. #if defined(CONFIG_BFIN_HDD_IDE) /* USE TRUE IDE */
  405. #define CFG_ATA_BASE_ADDR 0x20314000
  406. #define CFG_ATA_IDE0_OFFSET 0x0000
  407. #define CFG_ATA_DATA_OFFSET 0x0020 /* Offset for data I/O */
  408. #define CFG_ATA_REG_OFFSET 0x0020 /* Offset for normal register accesses */
  409. #define CFG_ATA_ALT_OFFSET 0x001C /* Offset for alternate registers */
  410. #define CFG_ATA_STRIDE 2 /* CF.A0 --> Blackfin.A1 */
  411. #undef CONFIG_SCLK_DIV
  412. #define CONFIG_SCLK_DIV 8
  413. #endif /* CONFIG_BFIN_HDD_IDE */
  414. #endif /*CONFIG_BFIN_IDE */
  415. #endif