* [ECOS] Boot from 32bits Flash ROM on PowerPC MBX860 => Solved
@ 2004-06-23 15:38 LAFON-PUYO Michel
0 siblings, 0 replies; only message in thread
From: LAFON-PUYO Michel @ 2004-06-23 15:38 UTC (permalink / raw)
To: ecos-discuss
Hi !
I made some changes on AMD29xxxxx driver and on MBX hal. Now, Redboot
can boot from the 32bits Flash Rom available on the board.
My board is 4Mbits (4xAM29F080 = 4x1Mbits), so my changes supports only
this configuration but it's very easy to extend that.
Here are the changes.
Michel
******** mbx.S *********
--- packages/hal/powerpc/mbx/current/src/mbx.S 23 May 2002 23:04:25
-0000 1.10
+++ packages/hal/powerpc/mbx/current/src/mbx.S 22 Jun 2004 09:20:05
-0000
@@ -267,7 +267,6 @@
* Base Register initialization.
*/
/* BOOT ROM */
- lwi r3,0xfe000401 # 8-bit, GPCM
#ifdef __50MHZ
lwi r5,0xff800960 /* for 120nS devices, else 0xff800940 */
#else
@@ -275,9 +274,11 @@
#endif
#ifdef CYGHWR_HAL_POWERPC_MBX_BOOT_32BIT_FLASH
// Then the 32-bit FLASH device is on CS0, the "ROM" is on CS7
+ lwi r3,0xfc000401 # 8-bit, GPCM, base adress 0xfc000000
stw r3,BR7(r4)
stw r5,OR7(r4)
#else // Boot from 8-bit ROM - the default, on CS0
+ lwi r3,0xfe000401 # 8-bit, GPCM, base adress 0xfe000000
stw r3,BR0(r4)
stw r5,OR0(r4)
#endif
@@ -322,7 +323,6 @@
stw r5,OR6(r4)
/* FLASH */
- lwi r3,0xfc000001 # 32-bit, GPCM
#ifdef __50MHZ
lwi r5,0xff800940
#else
@@ -330,9 +330,11 @@
#endif
#ifdef CYGHWR_HAL_POWERPC_MBX_BOOT_32BIT_FLASH
// Then the 32-bit FLASH device is on CS0, the "ROM" is on CS7
+ lwi r3,0xfe000001 # 32-bit, GPCM, base adress 0xfe000000
stw r3,BR0(r4)
stw r5,OR0(r4)
#else // Boot from 8-bit ROM - so the 32-bit FLASH is on CS7
+ lwi r3,0xfc000001 # 32-bit, GPCM, base adress 0xfc000000
stw r3,BR7(r4)
stw r5,OR7(r4)
#endif
******** flash_amd_am29xxxxx.cdl *********
---
packages/devs/flash/amd/am29xxxxx/current/cdl/flash_amd_am29xxxxx.cdl
24 Nov 2003 14:28:14 -0000 1.17
+++
packages/devs/flash/amd/am29xxxxx/current/cdl/flash_amd_am29xxxxx.cdl
21 Jun 2004 10:06:03 -0000
@@ -86,6 +86,16 @@
able to recognize and handle the AMD29F040B
part in the family."
}
+
+ cdl_option CYGHWR_DEVS_FLASH_AMD_AM29F080 {
+ display "AMD AM29F080 flash memory support"
+ default_value 0
+ implements CYGINT_DEVS_FLASH_AMD_VARIANTS
+ description "
+ When this option is enabled, the AMD flash driver will be
+ able to recognize and handle the AMD29F080
+ part in the family."
+ }
cdl_option CYGHWR_DEVS_FLASH_AMD_AM29LV128 {
display "AMD AM29LV128 flash memory support"
******** flash_am29xxxx_parts.inl ********
---
packages/devs/flash/amd/am29xxxxx/current/include/flash_am29xxxxx_parts.
inl 11 Apr 2004 11:47:17 -0000 1.21
+++
packages/devs/flash/amd/am29xxxxx/current/include/flash_am29xxxxx_parts.
inl 21 Jun 2004 10:06:29 -0000
@@ -103,6 +103,18 @@
bufsiz : 1
},
#endif
+#ifdef CYGHWR_DEVS_FLASH_AMD_AM29F080
+ { // AM29F080
+ device_id : FLASHWORD(0xd5),
+ block_size : 0x10000 * CYGNUM_FLASH_INTERLEAVE,
+ block_count: 16,
+ device_size: 0x100000 * CYGNUM_FLASH_INTERLEAVE,
+ base_mask : ~(0x100000 * CYGNUM_FLASH_INTERLEAVE - 1),
+ bootblock : false,
+ banked : false,
+ bufsiz : 1
+ },
+#endif
#ifdef CYGHWR_DEVS_FLASH_AMD_AM29LV160
{ // MBM29LV160-T | AM29LV160-T
device_id : FLASHWORD(0xc4),
@@ -407,7 +419,7 @@
0
},
bufsiz : 1
- }
+ },
#endif
#ifdef CYGHWR_DEVS_FLASH_AMD_AM29F800
{ // AM29F800-T
******** flash_am29xxxx.inl **************
---
packages/devs/flash/amd/am29xxxxx/current/include/flash_am29xxxxx.inl
23 Apr 2004 20:50:32 -0000 1.22
+++
packages/devs/flash/amd/am29xxxxx/current/include/flash_am29xxxxx.inl
21 Jun 2004 10:08:33 -0000
@@ -98,8 +98,15 @@
#endif
#if (_16AS8 == 0)
+
+#ifdef CYGHWR_DEVS_FLASH_AMD_AM29F080
+# define FLASH_Setup_Addr1 (0x5555)
+# define FLASH_Setup_Addr2 (0x2AAA)
+#else
# define FLASH_Setup_Addr1 (0x555)
# define FLASH_Setup_Addr2 (0x2AA)
+#endif
+
# define FLASH_VendorID_Addr (0)
# define FLASH_DeviceID_Addr (1)
# define FLASH_DeviceID_Addr2 (0x0e)
@@ -212,8 +219,9 @@
flash_data_t* id = (flash_data_t*) data;
flash_data_t w;
long timeout = CYGNUM_FLASH_TIMEOUT_QUERY;
-
+
ROM = (flash_data_t*) CYGNUM_FLASH_BASE;
+
f_s1 = FLASH_P2V(ROM+FLASH_Setup_Addr1);
f_s2 = FLASH_P2V(ROM+FLASH_Setup_Addr2);
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-06-23 15:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-23 15:38 [ECOS] Boot from 32bits Flash ROM on PowerPC MBX860 => Solved LAFON-PUYO Michel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).