Pull motherboard into test branch
authorLen Brown <len.brown@intel.com>
Sat, 3 Feb 2007 06:38:16 +0000 (01:38 -0500)
committerLen Brown <len.brown@intel.com>
Sat, 3 Feb 2007 06:38:16 +0000 (01:38 -0500)
Conflicts:

drivers/acpi/motherboard.c

Signed-off-by: Len Brown <len.brown@intel.com>
1  2 
arch/i386/defconfig
drivers/acpi/Makefile
drivers/acpi/osl.c

Simple merge
Simple merge
index a28f5b8972b42c6c589a2fd24126308fb4fecbe2,0acd0e716ba4f9c2979a71e54a8757e65101de65..0f6f3bcbc8ebc2d4b0c06cb8f1443d1fb5e6e9b6
@@@ -76,6 -75,54 +76,54 @@@ static acpi_osd_handler acpi_irq_handle
  static void *acpi_irq_context;
  static struct workqueue_struct *kacpid_wq;
  
 -      if (addr->address_space_id == ACPI_ADR_SPACE_SYSTEM_IO)
+ static void __init acpi_request_region (struct acpi_generic_address *addr,
+       unsigned int length, char *desc)
+ {
+       struct resource *res;
+       if (!addr->address || !length)
+               return;
 -      else if (addr->address_space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY)
++      if (addr->space_id == ACPI_ADR_SPACE_SYSTEM_IO)
+               res = request_region(addr->address, length, desc);
 -      acpi_request_region(&acpi_fadt.xpm1a_evt_blk, acpi_fadt.pm1_evt_len,
++      else if (addr->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY)
+               res = request_mem_region(addr->address, length, desc);
+ }
+ static int __init acpi_reserve_resources(void)
+ {
 -      acpi_request_region(&acpi_fadt.xpm1b_evt_blk, acpi_fadt.pm1_evt_len,
++      acpi_request_region(&acpi_gbl_FADT.xpm1a_event_block, acpi_gbl_FADT.pm1_event_length,
+               "ACPI PM1a_EVT_BLK");
 -      acpi_request_region(&acpi_fadt.xpm1a_cnt_blk, acpi_fadt.pm1_cnt_len,
++      acpi_request_region(&acpi_gbl_FADT.xpm1b_event_block, acpi_gbl_FADT.pm1_event_length,
+               "ACPI PM1b_EVT_BLK");
 -      acpi_request_region(&acpi_fadt.xpm1b_cnt_blk, acpi_fadt.pm1_cnt_len,
++      acpi_request_region(&acpi_gbl_FADT.xpm1a_control_block, acpi_gbl_FADT.pm1_control_length,
+               "ACPI PM1a_CNT_BLK");
 -      if (acpi_fadt.pm_tm_len == 4)
 -              acpi_request_region(&acpi_fadt.xpm_tmr_blk, 4, "ACPI PM_TMR");
++      acpi_request_region(&acpi_gbl_FADT.xpm1b_control_block, acpi_gbl_FADT.pm1_control_length,
+               "ACPI PM1b_CNT_BLK");
 -      acpi_request_region(&acpi_fadt.xpm2_cnt_blk, acpi_fadt.pm2_cnt_len,
++      if (acpi_gbl_FADT.pm_timer_length == 4)
++              acpi_request_region(&acpi_gbl_FADT.xpm_timer_block, 4, "ACPI PM_TMR");
 -      if (!(acpi_fadt.gpe0_blk_len & 0x1))
 -              acpi_request_region(&acpi_fadt.xgpe0_blk,
 -                             acpi_fadt.gpe0_blk_len, "ACPI GPE0_BLK");
++      acpi_request_region(&acpi_gbl_FADT.xpm2_control_block, acpi_gbl_FADT.pm2_control_length,
+               "ACPI PM2_CNT_BLK");
+       /* Length of GPE blocks must be a non-negative multiple of 2 */
 -      if (!(acpi_fadt.gpe1_blk_len & 0x1))
 -              acpi_request_region(&acpi_fadt.xgpe1_blk,
 -                             acpi_fadt.gpe1_blk_len, "ACPI GPE1_BLK");
++      if (!(acpi_gbl_FADT.gpe0_block_length & 0x1))
++              acpi_request_region(&acpi_gbl_FADT.xgpe0_block,
++                             acpi_gbl_FADT.gpe0_block_length, "ACPI GPE0_BLK");
++      if (!(acpi_gbl_FADT.gpe1_block_length & 0x1))
++              acpi_request_region(&acpi_gbl_FADT.xgpe1_block,
++                             acpi_gbl_FADT.gpe1_block_length, "ACPI GPE1_BLK");
+       return 0;
+ }
+ device_initcall(acpi_reserve_resources);
  acpi_status acpi_os_initialize(void)
  {
        return AE_OK;