Hi Harshal,
I have added my comments and examples to your second question Interfacing 25AA512 EEPROM to MC9S12GA240 using SPI
Unfortunately, S12G MCUs have no MODRR register. The Signals and Priorities for Port J can be found in "Table 2-4. Signals and Priorities" in the chapter "2.3 PIM Routing - Functional description" in the reference manual.
The signals available on each pin of port J can be found in the chapter 2.3.11 Pins PJ7-0 in the reference manual.
Also, you can look at the chapter 21.3.2.1 SPI Control Register 1 (SPICR1) in the reference manual.
I attached the code for MC33972 which was created for the S12XE (S12XE and S12G have the same SPI module).
The initialization of SPI you can find in the examples. For more details see Chapter 21 Serial Peripheral Interface (S12SPIV5) in the reference manual.
I hope it helps you.
Best regards,
Diana