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