Changeset 3594

Show
Ignore:
Timestamp:
09/24/08 00:19:27 (4 months ago)
Author:
mjones
Message:

The AMD dbm690t mainboard uses the it8712f SIO with the
default 48MHz clock input. The Asus a8n_e uses the it8712f
with a 24MHz clock input. The it8712f early init code was
setting a 24MHz input clock(to support the a8n_e).
Since 48Mhz is the default I added a function to set 24MHz
input clock to the a8n_e.

Signed-off-by: Marc Jones <marc.jones@…>
Acked-by: Rudolf Marek <r.marek@…>

Location:
trunk/coreboot-v2/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/coreboot-v2/src/mainboard/asus/a8n_e/cache_as_ram_auto.c

    r3052 r3594  
    222222        } 
    223223 
     224        it8712f_24mhz_clkin(); 
    224225        it8712f_enable_serial(SERIAL_DEV, TTYS0_BASE); 
    225226        uart_init(); 
  • trunk/coreboot-v2/src/superio/ite/it8712f/it8712f_early_serial.c

    r3052 r3594  
    4646} 
    4747 
    48 /* Enable the peripheral devices on the IT8712F Super I/O chip. */ 
    49 static void it8712f_enable_serial(device_t dev, unsigned iobase) 
     48 
     49static void it8712f_enter_conf(void) 
    5050{ 
    51         /* (1) Enter the configuration state (MB PnP mode). */ 
     51        /* Enter the configuration state (MB PnP mode). */ 
    5252 
    5353        /* Perform MB PnP setup to put the SIO chip at 0x2e. */ 
     
    5858        outb(0x55, IT8712F_CONFIGURATION_PORT); 
    5959        outb(0x55, IT8712F_CONFIGURATION_PORT); 
     60} 
     61 
     62static void it8712f_exit_conf(void) 
     63{ 
     64        /* Exit the configuration state (MB PnP mode). */ 
     65        it8712f_sio_write(0x00, IT8712F_CONFIG_REG_CC, 0x02); 
     66} 
     67 
     68 
     69static void it8712f_24mhz_clkin(void) 
     70{ 
     71        it8712f_enter_conf(); 
     72 
     73        /* Select 24MHz CLKIN (48MHZ default)*/ 
     74        it8712f_sio_write(0x00, IT8712F_CONFIG_REG_CLOCKSEL, 0x1); 
     75 
     76        it8712f_exit_conf(); 
     77 
     78} 
     79 
     80/* Enable the peripheral devices on the IT8712F Super I/O chip. */ 
     81static void it8712f_enable_serial(device_t dev, unsigned iobase) 
     82{ 
     83 
     84        /* (1) Enter the configuration state (MB PnP mode). */ 
     85        it8712f_enter_conf(); 
    6086 
    6187        /* (2) Modify the data of configuration registers. */ 
     
    7096        it8712f_sio_write(IT8712F_SP2,  0x30, 0x1); /* Serial port 2 */ 
    7197 
    72         /* Select 24MHz CLKIN (set bit 0). */ 
    73         it8712f_sio_write(0x00, IT8712F_CONFIG_REG_CLOCKSEL, 0x01); 
    74  
    7598        /* Clear software suspend mode (clear bit 0). TODO: Needed? */ 
    7699        /* it8712f_sio_write(0x00, IT8712F_CONFIG_REG_SWSUSP, 0x00); */ 
    77100 
    78101        /* (3) Exit the configuration state (MB PnP mode). */ 
    79         it8712f_sio_write(0x00, IT8712F_CONFIG_REG_CC, 0x02); 
     102        it8712f_exit_conf(); 
    80103} 
    81