Hello everyone,

I am encountering difficulties with initializing I2C on the RTEMS6 MVME3100 
BSP, required to run EPICS test. I have made adaptations based on Heinz's patch 
for RTEMS5, but I am experiencing an error. Here is the specific error message 
alongside an attached file showing the modifications made.

Welcome to rtems-6.0.0 (PowerPC/Generic (no FPU)/mvme3100)
BSP: mvme3100, CVS Release ($Name$)
CPU 0x8020 - rev 0x20
Additional boot options are
Initial system stack at 41cb0
Going to start PCI buses scanning and initialization
Board Type: MVME3100-1152 (S/N E1726C0)
External (=PCI Bus) Clock Freq   :   66666666 Hz
Core Complex Bus (CCB) Clock Freq:  333333330 Hz
CPU Clock Freq:                     133333332 Hz
Ethernet 0                  EC:9E:CD:19:B3:53
Ethernet 1                  EC:9E:CD:19:B3:54
Ethernet 2                  EC:9E:CD:19:B3:55
Number of PCI buses found is : 2
BUS:SLOT:FUN  VENDOR-DEV_ID: COMMAND STATUS BASE_ADDR0 BASE_ADDR1 IRQ_PIN -> 
IRQ_LINE
  0:0x00:0    0x1057-0x0008:  0x0006 0x20b0 0x80000000 0x00000000       0 ->   
0 (=0x00)
  0:0x11:0    0x10e3-0x0148:  0x0146 0x02b0 0x80100004 0x00000000       1 ->   
0 (=0x00)
  0:0x12:0    0x10b5-0x6520:  0x0147 0x02b0 0x00000000 0x00000000       0 ->   
0 (=0x00)
  0:0x14:0    0x1095-0x3124:  0x01c7 0x02b0 0x80300004 0x00000000       1 ->   
2 (=0x02)
Memory:                             268435456 bytes
Cleared PCI errors: pci_stat was 0x20b0
OpenPIC Version 1.2 (1 CPUs and 56 IRQ sources) at 0x3775135744
OpenPIC Vendor 0 (Unknown), Device 0 (Unknown), Stepping 0
OpenPIC timer frequency is not set
MSR is 0x00001000, TCR 0x04000000
-----------------------------------------
Exit from bspstart
Tundra Tsi148 PCI-VME bridge detected at 0x80100000, IRQ 0
Tsi148 Outbound Ports:
Port  VME-Addr   Size       PCI-Adrs   Mode:
0:    0x20000000 0x0e000000 0xc0000000 A32, SUP, D32, SCT
1:    0x00000000 0x00ff0000 0xcf000000 A24, SUP, D32, SCT
2:    0x00000000 0x00010000 0xcfff0000 A16, SUP, D32, SCT
7:    0x00000000 0x01000000 0xce000000 CSR, SUP, D32, SCT
Tsi148 Inbound Ports:
Port  VME-Addr   Size       PCI-Adrs   Mode:
0:    0xc0000000 0x10000000 0x00000000 A32, PGM, DAT, SUP, USR, MBLT, BLT
vmeTsi148 IRQ manager: looking for registers on VME...
Trying to find CSR on VME...
vmeTsi148 - IRQ manager using VME CSR to flush FIFO
-------- call BSP_i2c_initialize() with _IO_All_drivers_initialized = true
assumes that major 0 is assigned to i2c ---------
now trying to i2c intialized
libi2c: Claiming driver slot failed (rtems status code 10)
Initializing I2C library failed
now i2c intialized 2


*** BEGIN OF TEST HELLO WORLD ***
*** TEST VERSION: 6.0.0.b2967081e5daa673141d714a2e53280898dce566
*** TEST STATE: EXPECTED_PASS
*** TEST BUILD: RTEMS_POSIX_API
*** TEST TOOLS: 12.2.1 20230425 (RTEMS 6, RSB 
3c8c2ce38a8fe0a622f88fb3422d1f8fa609609b, Newlib 9ae9eef)
Hello World

*** END OF TEST HELLO WORLD ***

fatal source: RTEMS_FATAL_SOURCE_EXIT
exception vector 1 (0x1)
  next PC or address of fault = 0x902d8100
  saved MSR = 0x908d80f4
  context = task, ISR nest level = 0
  thread dispatch disable level = 0
  R0  = 0x9081003c R1  = 0x38800003 R2  = 0x48014e50 R3  = 0x9421ff50
  R4  = 0x9081003c R5  = 0x38800004 R6  = 0x48014e40 R7  = 0x902d8104
  R8  = 0x908d80f8 R9  = 0x38808005 R10 = 0x48014e2c R11 = 0x9421ff50
  R12 = 0x9081003c R13 = 0x38800006 R14 = 0x48014e20 R15 = 0x9421ff50
  R16 = 0x9081003c R17 = 0x38800007 R18 = 0x48014e10 R19 = 0x9421ff50
  R20 = 0x9081003c R21 = 0x38800008 R22 = 0x48014e00 R23 = 0x9421ff50
  R24 = 0x9081003c R25 = 0x3880000c R26 = 0x48014df0 R27 = 0x9421ff50
  R28 = 0x9081003c R29 = 0x38800018 R30 = 0x48014de0 R31 = 0x902d8104
  CR  = 0x9421ff50
  CTR = 0x38800002
  XER = 0x9081003c
  LR  = 0x48015578
 DEAR = 0x00000000
  ESR = 0x02000000
 MCSR = 0x00000000
  executing thread ID = 0x0a010001, name = UI1



Best Regards,
Zainab Olalekan
diff --git a/bsps/powerpc/mvme3100/start/bspstart.c 
b/bsps/powerpc/mvme3100/start/bspstart.c
index f27304c144..4df6f5326a 100644
--- a/bsps/powerpc/mvme3100/start/bspstart.c
+++ b/bsps/powerpc/mvme3100/start/bspstart.c
@@ -52,6 +52,8 @@
 extern unsigned long __rtems_end[];
 extern unsigned      ppc_exc_lock_std, ppc_exc_gpr3_std;
 
+extern bool _IO_All_drivers_initialized;
+
 /*
  * Copy Additional boot param passed by boot loader
  */
@@ -249,7 +251,7 @@ VpdBufRec          vpdData [] = {
   printk("CPU 0x%x - rev 0x%x\n", myCpu, myCpuRevision);
 
 #ifdef SHOW_MORE_INIT_SETTINGS
-  printk("Additionnal boot options are %s\n", BSP_commandline_string);
+  printk("Additional boot options are %s\n", BSP_commandline_string);
   printk("Initial system stack at %" PRIxPTR "\n", (uintptr_t) stack);
 #endif
 
@@ -431,7 +433,15 @@ void bsp_start( void )
 
 static void mvme3100_i2c_initialize(void)
 {
+       
+  printk("-------- call BSP_i2c_initialize() with _IO_All_drivers_initialized 
= true\n");
+  printk("assumes that major 0 is assigned to i2c ---------\n");
+  
+  printk("now trying to i2c intialized\n");
+  _IO_All_drivers_initialized = true; 
   BSP_i2c_initialize();
+  _IO_All_drivers_initialized = false; 
+  printk("now i2c intialized 2\n");
 }
 
 RTEMS_SYSINIT_ITEM(
diff --git a/bsps/shared/dev/rtc/ds1375.c b/bsps/shared/dev/rtc/ds1375.c
index e51744355f..dbb599ae19 100644
--- a/bsps/shared/dev/rtc/ds1375.c
+++ b/bsps/shared/dev/rtc/ds1375.c
@@ -434,7 +434,6 @@ bool rtc_ds1375_device_probe(
 )
 {
   int fd;
-
   if ( ( fd = getfd( minor ) ) < 0 ) {
     STDIOSAFE( "ds1375_probe (open): %s\n", strerror( errno ) );
     return false;
diff --git a/cpukit/sapi/src/io.c b/cpukit/sapi/src/io.c
index 3a3780610e..527d9c082b 100644
--- a/cpukit/sapi/src/io.c
+++ b/cpukit/sapi/src/io.c
@@ -50,6 +50,9 @@ void _IO_Initialize_all_drivers( void )
 
    _IO_All_drivers_initialized = true;
 
-   for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
+   //for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
+   
+   //printk(" _IO_Initialize_all_drivers starts from major=1 !!!\n");
+   for ( major=1 ; major < _IO_Number_of_drivers ; major ++ )
      (void) rtems_io_initialize( major, 0, NULL );
 }
diff --git a/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml 
b/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
index 1667c1617a..dc04e4dd36 100644
--- a/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
+++ b/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
@@ -64,6 +64,7 @@ source:
 - bsps/powerpc/mvme3100/pci/detect_host_bridge.c
 - bsps/powerpc/mvme3100/rtc/todcfg.c
 - bsps/powerpc/mvme3100/start/bspstart.c
+- bsps/powerpc/mvme3100/start/bspclean.c
 - bsps/powerpc/mvme3100/start/misc.c
 - bsps/powerpc/shared/btimer/btimer-ppc-dec.c
 - bsps/powerpc/shared/cache/cache.c
_______________________________________________
users mailing list
users@rtems.org
http://lists.rtems.org/mailman/listinfo/users

Reply via email to