bf537-stamp.h 16 KB

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