bf537-stamp.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502
  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. # define ADD_IDE_CMD CFG_CMD_IDE
  139. #else
  140. # define ADD_IDE_CMD 0
  141. #endif
  142. /*#define CONFIG_BF537_NAND */ /* Add nand flash support */
  143. #ifdef CONFIG_BF537_NAND
  144. # define ADD_NAND_CMD CFG_CMD_NAND
  145. #else
  146. # define ADD_NAND_CMD 0
  147. #endif
  148. #define CONFIG_NETCONSOLE 1
  149. #define CONFIG_NET_MULTI 1
  150. #if (BFIN_CPU == ADSP_BF534)
  151. #define CONFIG_BFIN_CMD (CONFIG_CMD_DFL & ~CFG_CMD_NET)
  152. #else
  153. #define CONFIG_BFIN_CMD (CONFIG_CMD_DFL | CFG_CMD_PING)
  154. #endif
  155. #if (BFIN_BOOT_MODE == BF537_BYPASS_BOOT)
  156. #define CONFIG_COMMANDS (CONFIG_BFIN_CMD| \
  157. CFG_CMD_ELF | \
  158. CFG_CMD_I2C | \
  159. CFG_CMD_CACHE | \
  160. CFG_CMD_JFFS2 | \
  161. CFG_CMD_EEPROM | \
  162. CFG_CMD_DHCP | \
  163. ADD_IDE_CMD | \
  164. ADD_NAND_CMD | \
  165. CFG_CMD_POST_DIAG | \
  166. CFG_CMD_DATE)
  167. #elif (BFIN_BOOT_MODE == BF537_SPI_MASTER_BOOT)
  168. #define CONFIG_COMMANDS (CONFIG_BFIN_CMD| \
  169. CFG_CMD_ELF | \
  170. CFG_CMD_I2C | \
  171. CFG_CMD_CACHE | \
  172. CFG_CMD_JFFS2 | \
  173. CFG_CMD_EEPROM | \
  174. ADD_IDE_CMD | \
  175. CFG_CMD_DATE)
  176. #endif
  177. #define CONFIG_BOOTARGS "root=/dev/mtdblock0 rw console=ttyBF0,57600"
  178. #define CONFIG_LOADADDR 0x1000000
  179. #if (BFIN_BOOT_MODE == BF537_BYPASS_BOOT)
  180. #if (BFIN_CPU != ADSP_BF534)
  181. #define CONFIG_EXTRA_ENV_SETTINGS \
  182. "ramargs=setenv bootargs root=/dev/mtdblock0 rw console=ttyBF0,57600\0" \
  183. "nfsargs=setenv bootargs root=/dev/nfs rw " \
  184. "nfsroot=$(serverip):$(rootpath) console=ttyBF0,57600\0"\
  185. "addip=setenv bootargs $(bootargs) " \
  186. "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask)" \
  187. ":$(hostname):eth0:off\0" \
  188. "ramboot=tftpboot $(loadaddr) linux;" \
  189. "run ramargs;run addip;bootelf\0" \
  190. "nfsboot=tftpboot $(loadaddr) linux;" \
  191. "run nfsargs;run addip;bootelf\0" \
  192. "flashboot=bootm 0x20100000\0" \
  193. "update=tftpboot $(loadaddr) u-boot.bin;" \
  194. "protect off 0x20000000 0x2007FFFF;" \
  195. "erase 0x20000000 0x2007FFFF;cp.b 0x1000000 0x20000000 $(filesize)\0" \
  196. ""
  197. #else
  198. #define CONFIG_EXTRA_ENV_SETTINGS \
  199. "ramargs=setenv bootargs root=/dev/mtdblock0 rw console=ttyBF0,57600\0" \
  200. "flashboot=bootm 0x20100000\0" \
  201. ""
  202. #endif
  203. #elif (BFIN_BOOT_MODE == BF537_SPI_MASTER_BOOT)
  204. #if (BFIN_CPU != ADSP_BF534)
  205. #define CONFIG_EXTRA_ENV_SETTINGS \
  206. "ramargs=setenv bootargs root=/dev/mtdblock0 rw console=ttyBF0,57600\0" \
  207. "nfsargs=setenv bootargs root=/dev/nfs rw " \
  208. "nfsroot=$(serverip):$(rootpath) console=ttyBF0,57600\0"\
  209. "addip=setenv bootargs $(bootargs) " \
  210. "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask)" \
  211. ":$(hostname):eth0:off\0" \
  212. "ramboot=tftpboot $(loadaddr) linux;" \
  213. "run ramargs;run addip;bootelf\0" \
  214. "nfsboot=tftpboot $(loadaddr) linux;" \
  215. "run nfsargs;run addip;bootelf\0" \
  216. "flashboot=bootm 0x20100000\0" \
  217. "update=tftpboot $(loadaddr) u-boot.ldr;" \
  218. "eeprom write $(loadaddr) 0x0 $(filesize);\0" \
  219. ""
  220. #else
  221. #define CONFIG_EXTRA_ENV_SETTINGS \
  222. "ramargs=setenv bootargs root=/dev/mtdblock0 rw console=ttyBF0,57600\0" \
  223. "flashboot=bootm 0x20100000\0" \
  224. ""
  225. #endif
  226. #endif
  227. /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
  228. #include <cmd_confdefs.h>
  229. #if (BFIN_BOOT_MODE == BF537_SPI_MASTER_BOOT)
  230. #if (BFIN_CPU == ADSP_BF534)
  231. #define CFG_PROMPT "serial_bf534> " /* Monitor Command Prompt */
  232. #elif (BFIN_CPU == ADSP_BF536)
  233. #define CFG_PROMPT "serial_bf536> " /* Monitor Command Prompt */
  234. #else
  235. #define CFG_PROMPT "serial_bf537> " /* Monitor Command Prompt */
  236. #endif
  237. #else
  238. #if (BFIN_CPU == ADSP_BF534)
  239. #define CFG_PROMPT "bf534> " /* Monitor Command Prompt */
  240. #elif (BFIN_CPU == ADSP_BF536)
  241. #define CFG_PROMPT "bf536> " /* Monitor Command Prompt */
  242. #else
  243. #define CFG_PROMPT "bf537> " /* Monitor Command Prompt */
  244. #endif
  245. #endif
  246. #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
  247. #define CFG_CBSIZE 1024 /* Console I/O Buffer Size */
  248. #else
  249. #define CFG_CBSIZE 256 /* Console I/O Buffer Size */
  250. #endif
  251. #define CFG_MAX_RAM_SIZE (CONFIG_MEM_SIZE * 1024*1024)
  252. #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
  253. #define CFG_MAXARGS 16 /* max number of command args */
  254. #define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
  255. #define CFG_MEMTEST_START 0x0 /* memtest works on */
  256. #define CFG_MEMTEST_END ( (CONFIG_MEM_SIZE - 1) * 1024*1024) /* 1 ... 63 MB in DRAM */
  257. #define CFG_LOAD_ADDR CONFIG_LOADADDR /* default load address */
  258. #define CFG_HZ 1000 /* decrementer freq: 10 ms ticks */
  259. #define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
  260. #define CFG_SDRAM_BASE 0x00000000
  261. #define CFG_FLASH_BASE 0x20000000
  262. #define CFG_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */
  263. #define CFG_MONITOR_BASE (CFG_MAX_RAM_SIZE - CFG_MONITOR_LEN)
  264. #define CFG_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */
  265. #define CFG_MALLOC_BASE (CFG_MONITOR_BASE - CFG_MALLOC_LEN)
  266. #define CFG_GBL_DATA_SIZE 0x4000
  267. #define CFG_GBL_DATA_ADDR (CFG_MALLOC_BASE - CFG_GBL_DATA_SIZE)
  268. #define CONFIG_STACKBASE (CFG_GBL_DATA_ADDR - 4)
  269. #define CFG_BOOTMAPSZ (8 << 20) /* Initial Memory map for Linux */
  270. #define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */
  271. #define CFG_MAX_FLASH_SECT 71 /* max number of sectors on one chip */
  272. #if (BFIN_BOOT_MODE == BF537_BYPASS_BOOT) || (BFIN_BOOT_MODE == BF537_UART_BOOT)
  273. /* for bf537-stamp, usrt boot mode still store env in flash */
  274. #define CFG_ENV_IS_IN_FLASH 1
  275. #define CFG_ENV_ADDR 0x20004000
  276. #define CFG_ENV_OFFSET (CFG_ENV_ADDR - CFG_FLASH_BASE)
  277. #elif (BFIN_BOOT_MODE == BF537_SPI_MASTER_BOOT)
  278. #define CFG_ENV_IS_IN_EEPROM 1
  279. #define CFG_ENV_OFFSET 0x4000
  280. #define CFG_ENV_HEADER (CFG_ENV_OFFSET + 0x16e) /* 0x12A is the length of LDR file header */
  281. #endif
  282. #define CFG_ENV_SIZE 0x2000
  283. #define CFG_ENV_SECT_SIZE 0x2000 /* Total Size of Environment Sector */
  284. /* #if (BFIN_BOOT_MODE == BF537_BYPASS_BOOT) */
  285. #define ENV_IS_EMBEDDED
  286. /* #endif */
  287. /* JFFS Partition offset set */
  288. #define CFG_JFFS2_FIRST_BANK 0
  289. #define CFG_JFFS2_NUM_BANKS 1
  290. /* 512k reserved for u-boot */
  291. #define CFG_JFFS2_FIRST_SECTOR 15
  292. #define CONFIG_SPI
  293. /*
  294. * Stack sizes
  295. */
  296. #define CONFIG_STACKSIZE (128*1024) /* regular stack */
  297. #define POLL_MODE 1
  298. #define FLASH_TOT_SECT 71
  299. #define FLASH_SIZE 0x400000
  300. #define CFG_FLASH_SIZE 0x400000
  301. /*
  302. * Board NAND Infomation
  303. */
  304. #define CFG_NAND_ADDR 0x20212000
  305. #define CFG_NAND_BASE CFG_NAND_ADDR
  306. #define CFG_MAX_NAND_DEVICE 1
  307. #define SECTORSIZE 512
  308. #define ADDR_COLUMN 1
  309. #define ADDR_PAGE 2
  310. #define ADDR_COLUMN_PAGE 3
  311. #define NAND_ChipID_UNKNOWN 0x00
  312. #define NAND_MAX_FLOORS 1
  313. #define NAND_MAX_CHIPS 1
  314. #define BFIN_NAND_READY PF3
  315. #define NAND_WAIT_READY(nand) \
  316. do { \
  317. int timeout = 0; \
  318. while(!(*pPORTFIO & PF3)) \
  319. if (timeout++ > 100000) \
  320. break; \
  321. } while (0)
  322. #define BFIN_NAND_CLE (1<<2) /* A2 -> Command Enable */
  323. #define BFIN_NAND_ALE (1<<1) /* A1 -> Address Enable */
  324. #define WRITE_NAND_COMMAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr | BFIN_NAND_CLE) = (__u8)(d); } while(0)
  325. #define WRITE_NAND_ADDRESS(d, adr) do{ *(volatile __u8 *)((unsigned long)adr | BFIN_NAND_ALE) = (__u8)(d); } while(0)
  326. #define WRITE_NAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)d; } while(0)
  327. #define READ_NAND(adr) ((volatile unsigned char)(*(volatile __u8 *)(unsigned long)adr))
  328. /*
  329. * Initialize PSD4256 registers for using I2C
  330. */
  331. #define CONFIG_MISC_INIT_R
  332. #define CFG_BOOTM_LEN 0x4000000 /* Large Image Length, set to 64 Meg */
  333. /*
  334. * I2C settings
  335. * By default PF1 is used as SDA and PF0 as SCL on the Stamp board
  336. */
  337. /* #define CONFIG_SOFT_I2C 1*/ /* I2C bit-banged */
  338. #define CONFIG_HARD_I2C 1 /* I2C TWI */
  339. #if defined CONFIG_HARD_I2C
  340. #define CONFIG_TWICLK_KHZ 50
  341. #endif
  342. #if defined CONFIG_SOFT_I2C
  343. /*
  344. * Software (bit-bang) I2C driver configuration
  345. */
  346. #define PF_SCL PF0
  347. #define PF_SDA PF1
  348. #define I2C_INIT (*pFIO_DIR |= PF_SCL); asm("ssync;")
  349. #define I2C_ACTIVE (*pFIO_DIR |= PF_SDA); *pFIO_INEN &= ~PF_SDA; asm("ssync;")
  350. #define I2C_TRISTATE (*pFIO_DIR &= ~PF_SDA); *pFIO_INEN |= PF_SDA; asm("ssync;")
  351. #define I2C_READ ((volatile)(*pFIO_FLAG_D & PF_SDA) != 0); asm("ssync;")
  352. #define I2C_SDA(bit) if(bit) { \
  353. *pFIO_FLAG_S = PF_SDA; \
  354. asm("ssync;"); \
  355. } \
  356. else { \
  357. *pFIO_FLAG_C = PF_SDA; \
  358. asm("ssync;"); \
  359. }
  360. #define I2C_SCL(bit) if(bit) { \
  361. *pFIO_FLAG_S = PF_SCL; \
  362. asm("ssync;"); \
  363. } \
  364. else { \
  365. *pFIO_FLAG_C = PF_SCL; \
  366. asm("ssync;"); \
  367. }
  368. #define I2C_DELAY udelay(5) /* 1/4 I2C clock duration */
  369. #endif
  370. #define CFG_I2C_SPEED 50000
  371. #define CFG_I2C_SLAVE 0xFE
  372. /* 0xFF, 0x7BB07BB0, 0x22547BB0 */
  373. /* #define AMGCTLVAL (AMBEN_P0 | AMBEN_P1 | AMBEN_P2 | AMCKEN)
  374. #define AMBCTL0VAL (B1WAT_7 | B1RAT_11 | B1HT_2 | B1ST_3 | B1TT_4 | ~B1RDYPOL | \
  375. ~B1RDYEN | B0WAT_7 | B0RAT_11 | B0HT_2 | B0ST_3 | B0TT_4 | ~B0RDYPOL | ~B0RDYEN)
  376. #define AMBCTL1VAL (B3WAT_2 | B3RAT_2 | B3HT_1 | B3ST_1 | B3TT_4 | B3RDYPOL | ~B3RDYEN | \
  377. B2WAT_7 | B2RAT_11 | B2HT_2 | B2ST_3 | B2TT_4 | ~B2RDYPOL | ~B2RDYEN)
  378. */
  379. #define AMGCTLVAL 0xFF
  380. #define AMBCTL0VAL 0x7BB07BB0
  381. #define AMBCTL1VAL 0xFFC27BB0
  382. #define CONFIG_VDSP 1
  383. #ifdef CONFIG_VDSP
  384. #define ET_EXEC_VDSP 0x8
  385. #define SHT_STRTAB_VDSP 0x1
  386. #define ELFSHDRSIZE_VDSP 0x2C
  387. #define VDSP_ENTRY_ADDR 0xFFA00000
  388. #endif
  389. #if defined(CONFIG_BFIN_IDE)
  390. #define CONFIG_DOS_PARTITION 1
  391. /*
  392. * IDE/ATA stuff
  393. */
  394. #undef CONFIG_IDE_8xx_DIRECT /* no pcmcia interface required */
  395. #undef CONFIG_IDE_LED /* no led for ide supported */
  396. #undef CONFIG_IDE_RESET /* no reset for ide supported */
  397. #define CFG_IDE_MAXBUS 1 /* max. 1 IDE busses */
  398. #define CFG_IDE_MAXDEVICE (CFG_IDE_MAXBUS*1) /* max. 1 drives per IDE bus */
  399. #undef AMBCTL1VAL
  400. #define AMBCTL1VAL 0xFFC3FFC3
  401. #define CONFIG_CF_ATASEL_DIS 0x20311800
  402. #define CONFIG_CF_ATASEL_ENA 0x20311802
  403. #if defined(CONFIG_BFIN_TRUE_IDE)
  404. /*
  405. * Note that these settings aren't for the most part used in include/ata.h
  406. * when all of the ATA registers are setup
  407. */
  408. #define CFG_ATA_BASE_ADDR 0x2031C000
  409. #define CFG_ATA_IDE0_OFFSET 0x0000
  410. #define CFG_ATA_DATA_OFFSET 0x0020 /* Offset for data I/O */
  411. #define CFG_ATA_REG_OFFSET 0x0020 /* Offset for normal register accesses */
  412. #define CFG_ATA_ALT_OFFSET 0x001C /* Offset for alternate registers */
  413. #define CFG_ATA_STRIDE 2 /* CF.A0 --> Blackfin.Ax */
  414. #endif /* CONFIG_BFIN_TRUE_IDE */
  415. #if defined(CONFIG_BFIN_CF_IDE) /* USE CompactFlash Storage Card in the common memory space */
  416. #define CFG_ATA_BASE_ADDR 0x20211800
  417. #define CFG_ATA_IDE0_OFFSET 0x0000
  418. #define CFG_ATA_DATA_OFFSET 0x0000 /* Offset for data I/O */
  419. #define CFG_ATA_REG_OFFSET 0x0000 /* Offset for normal register accesses */
  420. #define CFG_ATA_ALT_OFFSET 0x000E /* Offset for alternate registers */
  421. #define CFG_ATA_STRIDE 1 /* CF.A0 --> Blackfin.Ax */
  422. #endif /* CONFIG_BFIN_CF_IDE */
  423. #if defined(CONFIG_BFIN_HDD_IDE) /* USE TRUE IDE */
  424. #define CFG_ATA_BASE_ADDR 0x20314000
  425. #define CFG_ATA_IDE0_OFFSET 0x0000
  426. #define CFG_ATA_DATA_OFFSET 0x0020 /* Offset for data I/O */
  427. #define CFG_ATA_REG_OFFSET 0x0020 /* Offset for normal register accesses */
  428. #define CFG_ATA_ALT_OFFSET 0x001C /* Offset for alternate registers */
  429. #define CFG_ATA_STRIDE 2 /* CF.A0 --> Blackfin.A1 */
  430. #undef CONFIG_SCLK_DIV
  431. #define CONFIG_SCLK_DIV 8
  432. #endif /* CONFIG_BFIN_HDD_IDE */
  433. #endif /*CONFIG_BFIN_IDE */
  434. #endif