Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 74865
b: refs/heads/master
c: cbd84ec
h: refs/heads/master
i:
  74863: 52eadd8
v: v3
  • Loading branch information
Linus Torvalds committed Dec 17, 2007
1 parent bc86d66 commit e99abe8
Show file tree
Hide file tree
Showing 19 changed files with 80 additions and 62 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 280bb6b1f76aaec29a721b1025ec5d69afba57e8
refs/heads/master: cbd84ec0d5cf4ff760caa4b6de2925a21e21437d
9 changes: 0 additions & 9 deletions trunk/arch/mips/au1000/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ config MIPS_MTX1
bool "4G Systems MTX-1 board"
select DMA_NONCOHERENT
select HW_HAS_PCI
select RESOURCES_64BIT if PCI
select SOC_AU1500
select SYS_SUPPORTS_LITTLE_ENDIAN

Expand All @@ -22,7 +21,6 @@ config MIPS_DB1000
select SOC_AU1000
select DMA_NONCOHERENT
select HW_HAS_PCI
select RESOURCES_64BIT if PCI
select SYS_SUPPORTS_LITTLE_ENDIAN

config MIPS_DB1100
Expand All @@ -44,7 +42,6 @@ config MIPS_DB1500
select DMA_NONCOHERENT
select HW_HAS_PCI
select MIPS_DISABLE_OBSOLETE_IDE
select RESOURCES_64BIT if PCI
select SYS_SUPPORTS_BIG_ENDIAN
select SYS_SUPPORTS_LITTLE_ENDIAN

Expand All @@ -54,7 +51,6 @@ config MIPS_DB1550
select HW_HAS_PCI
select DMA_NONCOHERENT
select MIPS_DISABLE_OBSOLETE_IDE
select RESOURCES_64BIT if PCI
select SYS_SUPPORTS_LITTLE_ENDIAN

config MIPS_MIRAGE
Expand All @@ -68,7 +64,6 @@ config MIPS_PB1000
select SOC_AU1000
select DMA_NONCOHERENT
select HW_HAS_PCI
select RESOURCES_64BIT if PCI
select SWAP_IO_SPACE
select SYS_SUPPORTS_LITTLE_ENDIAN

Expand All @@ -77,7 +72,6 @@ config MIPS_PB1100
select SOC_AU1100
select DMA_NONCOHERENT
select HW_HAS_PCI
select RESOURCES_64BIT if PCI
select SWAP_IO_SPACE
select SYS_SUPPORTS_LITTLE_ENDIAN

Expand All @@ -86,15 +80,13 @@ config MIPS_PB1200
select SOC_AU1200
select DMA_NONCOHERENT
select MIPS_DISABLE_OBSOLETE_IDE
select RESOURCES_64BIT if PCI
select SYS_SUPPORTS_LITTLE_ENDIAN

config MIPS_PB1500
bool "Alchemy PB1500 board"
select SOC_AU1500
select DMA_NONCOHERENT
select HW_HAS_PCI
select RESOURCES_64BIT if PCI
select SYS_SUPPORTS_LITTLE_ENDIAN

config MIPS_PB1550
Expand All @@ -103,7 +95,6 @@ config MIPS_PB1550
select DMA_NONCOHERENT
select HW_HAS_PCI
select MIPS_DISABLE_OBSOLETE_IDE
select RESOURCES_64BIT if PCI
select SYS_SUPPORTS_LITTLE_ENDIAN

config MIPS_XXS1500
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/mips/au1000/common/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@

/* TBD */
static struct resource pci_io_resource = {
.start = (resource_size_t)PCI_IO_START,
.end = (resource_size_t)PCI_IO_END,
.start = PCI_IO_START,
.end = PCI_IO_END,
.name = "PCI IO space",
.flags = IORESOURCE_IO
};

static struct resource pci_mem_resource = {
.start = (resource_size_t)PCI_MEM_START,
.end = (resource_size_t)PCI_MEM_END,
.start = PCI_MEM_START,
.end = PCI_MEM_END,
.name = "PCI memory space",
.flags = IORESOURCE_MEM
};
Expand Down
9 changes: 4 additions & 5 deletions trunk/arch/mips/au1000/common/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,11 @@ phys_t __fixup_bigphys_addr(phys_t phys_addr, phys_t size)

#ifdef CONFIG_PCI
{
u32 start, end;
u32 start = (u32)Au1500_PCI_MEM_START;
u32 end = (u32)Au1500_PCI_MEM_END;

start = (u32)Au1500_PCI_MEM_START;
end = (u32)Au1500_PCI_MEM_END;
/* check for pci memory window */
if ((phys_addr >= start) && ((phys_addr + size) < end))
/* Check for PCI memory window */
if (phys_addr >= start && (phys_addr + size - 1) <= end)
return (phys_t)
((phys_addr - start) + Au1500_PCI_MEM_START);
}
Expand Down
21 changes: 20 additions & 1 deletion trunk/arch/mips/cobalt/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,28 @@

void __init plat_time_init(void)
{
u32 start, end;
int i = HZ / 10;

setup_pit_timer();

gt641xx_set_base_clock(GT641XX_BASE_CLOCK);

mips_timer_state = gt641xx_timer0_state;
/*
* MIPS counter frequency is measured during a 100msec interval
* using GT64111 timer0.
*/
while (!gt641xx_timer0_state())
;

start = read_c0_count();

while (i--)
while (!gt641xx_timer0_state())
;

end = read_c0_count();

mips_hpt_frequency = (end - start) * 10;
printk(KERN_INFO "MIPS counter frequency %dHz\n", mips_hpt_frequency);
}
3 changes: 1 addition & 2 deletions trunk/arch/mips/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,8 @@ void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp)
unsigned long status;

/* New thread loses kernel privileges. */
status = regs->cp0_status & ~(ST0_CU0|ST0_CU1|KU_MASK);
status = regs->cp0_status & ~(ST0_CU0|ST0_CU1|ST0_FR|KU_MASK);
#ifdef CONFIG_64BIT
status &= ~ST0_FR;
status |= test_thread_flag(TIF_32BIT_REGS) ? 0 : ST0_FR;
#endif
status |= KU_USER;
Expand Down
4 changes: 0 additions & 4 deletions trunk/arch/mips/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,6 @@ void __cpuinit clockevent_set_clock(struct clock_event_device *cd,
cd->mult = (u32) temp;
}

void __init __weak plat_time_init(void)
{
}

/*
* This function exists in order to cause an error due to a duplicate
* definition if platform code should have its own implementation. The hook
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/mips/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -1317,12 +1317,12 @@ void __init per_cpu_trap_init(void)
#endif
if (current_cpu_data.isa_level == MIPS_CPU_ISA_IV)
status_set |= ST0_XX;
if (cpu_has_dsp)
status_set |= ST0_MX;

change_c0_status(ST0_CU|ST0_MX|ST0_RE|ST0_FR|ST0_BEV|ST0_TS|ST0_KX|ST0_SX|ST0_UX,
status_set);

if (cpu_has_dsp)
set_c0_status(ST0_MX);

#ifdef CONFIG_CPU_MIPSR2
if (cpu_has_mips_r2) {
unsigned int enable = 0x0000000f;
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/mips/mips-boards/generic/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ void __init prom_meminit(void)

void __init prom_free_prom_memory(void)
{
#if 0 /* for now ... */
unsigned long addr;
int i;

Expand All @@ -180,4 +181,5 @@ void __init prom_free_prom_memory(void)
free_init_pages("prom memory",
addr, addr + boot_mem_map.map[i].size);
}
#endif
}
2 changes: 2 additions & 0 deletions trunk/arch/mips/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ static void pcibios_fixup_device_resources(struct pci_dev *dev,
for (i = 0; i < PCI_NUM_RESOURCES; i++) {
if (!dev->resource[i].start)
continue;
if (dev->resource[i].flags & IORESOURCE_PCI_FIXED)
continue;
if (dev->resource[i].flags & IORESOURCE_IO)
offset = hose->io_offset;
else if (dev->resource[i].flags & IORESOURCE_MEM)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/acpi/battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ static int acpi_battery_technology(struct acpi_battery *battery)
return POWER_SUPPLY_TECHNOLOGY_NiMH;
if (!strcasecmp("LION", battery->type))
return POWER_SUPPLY_TECHNOLOGY_LION;
if (!strcasecmp("LI-ION", battery->type))
if (!strncasecmp("LI-ION", battery->type, 6))
return POWER_SUPPLY_TECHNOLOGY_LION;
if (!strcasecmp("LiP", battery->type))
return POWER_SUPPLY_TECHNOLOGY_LIPO;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/acpi/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ ACPI_MODULE_NAME("numa");
static nodemask_t nodes_found_map = NODE_MASK_NONE;

/* maps to convert between proximity domain and logical node ID */
static int __cpuinitdata pxm_to_node_map[MAX_PXM_DOMAINS]
static int pxm_to_node_map[MAX_PXM_DOMAINS]
= { [0 ... MAX_PXM_DOMAINS - 1] = NID_INVAL };
static int __cpuinitdata node_to_pxm_map[MAX_NUMNODES]
static int node_to_pxm_map[MAX_NUMNODES]
= { [0 ... MAX_NUMNODES - 1] = PXM_INVAL };

int pxm_to_node(int pxm)
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/acpi/pci_bind.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,6 @@ int acpi_pci_unbind(struct acpi_device *device)
acpi_get_data(device->handle, acpi_pci_data_handler,
(void **)&data);
if (ACPI_FAILURE(status)) {
ACPI_EXCEPTION((AE_INFO, status,
"Unable to get data from device %s",
acpi_device_bid(device)));
result = -ENODEV;
goto end;
}
Expand Down
27 changes: 12 additions & 15 deletions trunk/drivers/acpi/sbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,6 @@
#define ACPI_BATTERY_DIR_NAME "BAT%i"
#define ACPI_AC_DIR_NAME "AC0"

enum acpi_sbs_device_addr {
ACPI_SBS_CHARGER = 0x9,
ACPI_SBS_MANAGER = 0xa,
ACPI_SBS_BATTERY = 0xb,
};

#define ACPI_SBS_NOTIFY_STATUS 0x80
#define ACPI_SBS_NOTIFY_INFO 0x81

Expand Down Expand Up @@ -539,7 +533,7 @@ static struct proc_dir_entry *acpi_battery_dir = NULL;

static inline char *acpi_battery_units(struct acpi_battery *battery)
{
return acpi_battery_mode(battery) ? " mWh" : " mAh";
return acpi_battery_mode(battery) ? " mW" : " mA";
}


Expand All @@ -556,10 +550,10 @@ static int acpi_battery_read_info(struct seq_file *seq, void *offset)
if (!battery->present)
goto end;

seq_printf(seq, "design capacity: %i%s\n",
seq_printf(seq, "design capacity: %i%sh\n",
battery->design_capacity * acpi_battery_scale(battery),
acpi_battery_units(battery));
seq_printf(seq, "last full capacity: %i%s\n",
seq_printf(seq, "last full capacity: %i%sh\n",
battery->full_charge_capacity * acpi_battery_scale(battery),
acpi_battery_units(battery));
seq_printf(seq, "battery technology: rechargeable\n");
Expand Down Expand Up @@ -590,7 +584,7 @@ static int acpi_battery_read_state(struct seq_file *seq, void *offset)
{
struct acpi_battery *battery = seq->private;
struct acpi_sbs *sbs = battery->sbs;
int result = 0;
int rate;

mutex_lock(&sbs->lock);
seq_printf(seq, "present: %s\n",
Expand All @@ -604,17 +598,20 @@ static int acpi_battery_read_state(struct seq_file *seq, void *offset)
seq_printf(seq, "charging state: %s\n",
(battery->current_now < 0) ? "discharging" :
((battery->current_now > 0) ? "charging" : "charged"));
seq_printf(seq, "present rate: %d mA\n",
abs(battery->current_now) * acpi_battery_ipscale(battery));
seq_printf(seq, "remaining capacity: %i%s\n",
rate = abs(battery->current_now) * acpi_battery_ipscale(battery);
rate *= (acpi_battery_mode(battery))?(battery->voltage_now *
acpi_battery_vscale(battery)/1000):1;
seq_printf(seq, "present rate: %d%s\n", rate,
acpi_battery_units(battery));
seq_printf(seq, "remaining capacity: %i%sh\n",
battery->capacity_now * acpi_battery_scale(battery),
acpi_battery_units(battery));
seq_printf(seq, "present voltage: %i mV\n",
battery->voltage_now * acpi_battery_vscale(battery));

end:
mutex_unlock(&sbs->lock);
return result;
return 0;
}

static int acpi_battery_state_open_fs(struct inode *inode, struct file *file)
Expand All @@ -638,7 +635,7 @@ static int acpi_battery_read_alarm(struct seq_file *seq, void *offset)
acpi_battery_get_alarm(battery);
seq_printf(seq, "alarm: ");
if (battery->alarm_capacity)
seq_printf(seq, "%i%s\n",
seq_printf(seq, "%i%sh\n",
battery->alarm_capacity *
acpi_battery_scale(battery),
acpi_battery_units(battery));
Expand Down
17 changes: 13 additions & 4 deletions trunk/drivers/acpi/sbshc.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,9 @@ int acpi_smbus_unregister_callback(struct acpi_smb_hc *hc)

EXPORT_SYMBOL_GPL(acpi_smbus_unregister_callback);

static void acpi_smbus_callback(void *context)
static inline void acpi_smbus_callback(void *context)
{
struct acpi_smb_hc *hc = context;

if (hc->callback)
hc->callback(hc->context);
}
Expand All @@ -214,6 +213,7 @@ static int smbus_alarm(void *context)
{
struct acpi_smb_hc *hc = context;
union acpi_smb_status status;
u8 address;
if (smb_hc_read(hc, ACPI_SMB_STATUS, &status.raw))
return 0;
/* Check if it is only a completion notify */
Expand All @@ -222,9 +222,18 @@ static int smbus_alarm(void *context)
if (!status.fields.alarm)
return 0;
mutex_lock(&hc->lock);
smb_hc_read(hc, ACPI_SMB_ALARM_ADDRESS, &address);
status.fields.alarm = 0;
smb_hc_write(hc, ACPI_SMB_STATUS, status.raw);
if (hc->callback)
acpi_os_execute(OSL_GPE_HANDLER, acpi_smbus_callback, hc);
/* We are only interested in events coming from known devices */
switch (address >> 1) {
case ACPI_SBS_CHARGER:
case ACPI_SBS_MANAGER:
case ACPI_SBS_BATTERY:
acpi_os_execute(OSL_GPE_HANDLER,
acpi_smbus_callback, hc);
default:;
}
mutex_unlock(&hc->lock);
return 0;
}
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/acpi/sbshc.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ enum acpi_smb_protocol {

static const u8 SMBUS_PEC = 0x80;

enum acpi_sbs_device_addr {
ACPI_SBS_CHARGER = 0x9,
ACPI_SBS_MANAGER = 0xa,
ACPI_SBS_BATTERY = 0xb,
};

typedef void (*smbus_alarm_callback)(void *context);

extern int acpi_smbus_read(struct acpi_smb_hc *hc, u8 protocol, u8 address,
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/acpi/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
struct acpi_video_device_brightness *br = NULL;


memset(&device->cap, 0, 4);
memset(&device->cap, 0, sizeof(device->cap));

if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_ADR", &h_dummy1))) {
device->cap._ADR = 1;
Expand Down Expand Up @@ -697,7 +697,7 @@ static void acpi_video_bus_find_cap(struct acpi_video_bus *video)
{
acpi_handle h_dummy1;

memset(&video->cap, 0, 4);
memset(&video->cap, 0, sizeof(video->cap));
if (ACPI_SUCCESS(acpi_get_handle(video->device->handle, "_DOS", &h_dummy1))) {
video->cap._DOS = 1;
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/misc/thinkpad_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -987,9 +987,9 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
KEY_UNKNOWN, /* 0x0C: FN+BACKSPACE */
KEY_UNKNOWN, /* 0x0D: FN+INSERT */
KEY_UNKNOWN, /* 0x0E: FN+DELETE */
KEY_BRIGHTNESSUP, /* 0x0F: FN+HOME (brightness up) */
KEY_RESERVED, /* 0x0F: FN+HOME (brightness up) */
/* Scan codes 0x10 to 0x1F: Extended ACPI HKEY hot keys */
KEY_BRIGHTNESSDOWN, /* 0x10: FN+END (brightness down) */
KEY_RESERVED, /* 0x10: FN+END (brightness down) */
KEY_RESERVED, /* 0x11: FN+PGUP (thinklight toggle) */
KEY_UNKNOWN, /* 0x12: FN+PGDOWN */
KEY_ZOOM, /* 0x13: FN+SPACE (zoom) */
Expand Down
Loading

0 comments on commit e99abe8

Please sign in to comment.