Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 288414
b: refs/heads/master
c: c215ab9
h: refs/heads/master
v: v3
  • Loading branch information
Ben Hutchings authored and Matthew Garrett committed Mar 12, 2012
1 parent 6fffef3 commit 4705645
Show file tree
Hide file tree
Showing 13 changed files with 186 additions and 22 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: 0ae5eaf1032ca3cd5a0097f72992fc4821c762fa
refs/heads/master: c215ab9a7530d415707430de8d51a58ca6a41808
1 change: 0 additions & 1 deletion trunk/arch/arm/mach-shmobile/board-ag5evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include <linux/mmc/sh_mobile_sdhi.h>
#include <linux/mfd/tmio.h>
#include <linux/sh_clk.h>
#include <linux/videodev2.h>
#include <video/sh_mobile_lcdc.h>
#include <video/sh_mipi_dsi.h>
#include <sound/sh_fsi.h>
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-shmobile/board-ap4evb.c
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ static struct fsi_ak4642_info fsi2_ak4643_info = {
static struct platform_device fsi_ak4643_device = {
.name = "fsi-ak4642-audio",
.dev = {
.platform_data = &fsi2_ak4643_info,
.platform_data = &fsi_info,
},
};

Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/arm/mach-shmobile/board-bonito.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <linux/platform_device.h>
#include <linux/gpio.h>
#include <linux/smsc911x.h>
#include <linux/videodev2.h>
#include <mach/common.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
Expand Down Expand Up @@ -242,7 +241,7 @@ static struct sh_mobile_lcdc_info lcdc0_info = {
.clock_source = LCDC_CLK_BUS,
.ch[0] = {
.chan = LCDC_CHAN_MAINLCD,
.fourcc = V4L2_PIX_FMT_RGB565,
.bpp = 16,
.interface_type = RGB24,
.clock_divider = 5,
.flags = 0,
Expand Down
4 changes: 0 additions & 4 deletions trunk/arch/arm/mach-shmobile/board-mackerel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1352,10 +1352,6 @@ static struct map_desc mackerel_io_desc[] __initdata = {
static void __init mackerel_map_io(void)
{
iotable_init(mackerel_io_desc, ARRAY_SIZE(mackerel_io_desc));
/* DMA memory at 0xff200000 - 0xffdfffff. The default 2MB size isn't
* enough to allocate the frame buffer memory.
*/
init_consistent_dma_size(12 << 20);

/* setup early devices and console here as well */
sh7372_add_early_devices();
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/sh/kernel/cpu/sh2a/ex.S
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ vector = 0
.long exception_entry0 + vector * 6
vector = vector + 1
.endr
vector = 0
.rept 256
.long exception_entry1 + vector * 6
vector = vector + 1
Expand Down
4 changes: 1 addition & 3 deletions trunk/arch/sh/kernel/cpu/sh4a/clock-sh7757.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ struct clk div4_clks[DIV4_NR] = {
#define MSTPCR1 0xffc80034
#define MSTPCR2 0xffc10028

enum { MSTP004, MSTP000, MSTP127, MSTP114, MSTP113, MSTP112,
enum { MSTP004, MSTP000, MSTP114, MSTP113, MSTP112,
MSTP111, MSTP110, MSTP103, MSTP102, MSTP220,
MSTP_NR };

Expand All @@ -89,7 +89,6 @@ static struct clk mstp_clks[MSTP_NR] = {
[MSTP000] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 0, 0),

/* MSTPCR1 */
[MSTP127] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 27, 0),
[MSTP114] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 14, 0),
[MSTP113] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 13, 0),
[MSTP112] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR1, 12, 0),
Expand Down Expand Up @@ -132,7 +131,6 @@ static struct clk_lookup lookups[] = {
CLKDEV_CON_ID("usb_fck", &mstp_clks[MSTP103]),
CLKDEV_DEV_ID("renesas_usbhs.0", &mstp_clks[MSTP102]),
CLKDEV_CON_ID("mmc0", &mstp_clks[MSTP220]),
CLKDEV_CON_ID("rspi2", &mstp_clks[MSTP127]),
};

int __init arch_clk_init(void)
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sh/kernel/cpu/sh4a/clock-sh7785.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ static struct clk_lookup lookups[] = {
CLKDEV_CON_ID("siof_fck", &mstp_clks[MSTP003]),
CLKDEV_CON_ID("hspi_fck", &mstp_clks[MSTP002]),
CLKDEV_CON_ID("hudi_fck", &mstp_clks[MSTP119]),
CLKDEV_CON_ID("ubc0", &mstp_clks[MSTP117]),
CLKDEV_CON_ID("ubc_fck", &mstp_clks[MSTP117]),
CLKDEV_CON_ID("dmac_11_6_fck", &mstp_clks[MSTP105]),
CLKDEV_CON_ID("dmac_5_0_fck", &mstp_clks[MSTP104]),
CLKDEV_CON_ID("gdta_fck", &mstp_clks[MSTP100]),
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/pci/pcie/aspm.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,9 +500,6 @@ static int pcie_aspm_sanity_check(struct pci_dev *pdev)
int pos;
u32 reg32;

if (aspm_disabled)
return 0;

/*
* Some functions in a slot might not all be PCIe functions,
* very strange. Disable ASPM for the whole slot
Expand Down
7 changes: 7 additions & 0 deletions trunk/drivers/platform/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,13 @@ config FUJITSU_LAPTOP_DEBUG

If you are not sure, say N here.

config AMILO_RFKILL
tristate "Fujitsu-Siemens Amilo rfkill support"
depends on RFKILL
---help---
This is a driver for enabling wifi on some Fujitsu-Siemens Amilo
laptops.

config TC1100_WMI
tristate "HP Compaq TC1100 Tablet WMI Extras (EXPERIMENTAL)"
depends on !X86_64
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/platform/x86/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ obj-$(CONFIG_ACER_WMI) += acer-wmi.o
obj-$(CONFIG_ACERHDF) += acerhdf.o
obj-$(CONFIG_HP_ACCEL) += hp_accel.o
obj-$(CONFIG_HP_WMI) += hp-wmi.o
obj-$(CONFIG_AMILO_RFKILL) += amilo-rfkill.o
obj-$(CONFIG_TC1100_WMI) += tc1100-wmi.o
obj-$(CONFIG_SONY_LAPTOP) += sony-laptop.o
obj-$(CONFIG_IDEAPAD_LAPTOP) += ideapad-laptop.o
Expand Down
173 changes: 173 additions & 0 deletions trunk/drivers/platform/x86/amilo-rfkill.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
/*
* Support for rfkill on some Fujitsu-Siemens Amilo laptops.
* Copyright 2011 Ben Hutchings.
*
* Based in part on the fsam7440 driver, which is:
* Copyright 2005 Alejandro Vidal Mata & Javier Vidal Mata.
* and on the fsaa1655g driver, which is:
* Copyright 2006 Martin Večeřa.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/

#include <linux/module.h>
#include <linux/dmi.h>
#include <linux/i8042.h>
#include <linux/io.h>
#include <linux/moduleparam.h>
#include <linux/platform_device.h>
#include <linux/rfkill.h>

/*
* These values were obtained from disassembling and debugging the
* PM.exe program installed in the Fujitsu-Siemens AMILO A1655G
*/
#define A1655_WIFI_COMMAND 0x10C5
#define A1655_WIFI_ON 0x25
#define A1655_WIFI_OFF 0x45

static int amilo_a1655_rfkill_set_block(void *data, bool blocked)
{
u8 param = blocked ? A1655_WIFI_OFF : A1655_WIFI_ON;
int rc;

i8042_lock_chip();
rc = i8042_command(&param, A1655_WIFI_COMMAND);
i8042_unlock_chip();
return rc;
}

static const struct rfkill_ops amilo_a1655_rfkill_ops = {
.set_block = amilo_a1655_rfkill_set_block
};

/*
* These values were obtained from disassembling the PM.exe program
* installed in the Fujitsu-Siemens AMILO M 7440
*/
#define M7440_PORT1 0x118f
#define M7440_PORT2 0x118e
#define M7440_RADIO_ON1 0x12
#define M7440_RADIO_ON2 0x80
#define M7440_RADIO_OFF1 0x10
#define M7440_RADIO_OFF2 0x00

static int amilo_m7440_rfkill_set_block(void *data, bool blocked)
{
u8 val1 = blocked ? M7440_RADIO_OFF1 : M7440_RADIO_ON1;
u8 val2 = blocked ? M7440_RADIO_OFF2 : M7440_RADIO_ON2;

outb(val1, M7440_PORT1);
outb(val2, M7440_PORT2);

/* Check whether the state has changed correctly */
if (inb(M7440_PORT1) != val1 || inb(M7440_PORT2) != val2)
return -EIO;

return 0;
}

static const struct rfkill_ops amilo_m7440_rfkill_ops = {
.set_block = amilo_m7440_rfkill_set_block
};

static const struct dmi_system_id __devinitdata amilo_rfkill_id_table[] = {
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
DMI_MATCH(DMI_BOARD_NAME, "AMILO A1655"),
},
.driver_data = (void *)&amilo_a1655_rfkill_ops
},
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
DMI_MATCH(DMI_BOARD_NAME, "AMILO M7440"),
},
.driver_data = (void *)&amilo_m7440_rfkill_ops
},
{}
};

static struct platform_device *amilo_rfkill_pdev;
static struct rfkill *amilo_rfkill_dev;

static int __devinit amilo_rfkill_probe(struct platform_device *device)
{
const struct dmi_system_id *system_id =
dmi_first_match(amilo_rfkill_id_table);
int rc;

amilo_rfkill_dev = rfkill_alloc(KBUILD_MODNAME, &device->dev,
RFKILL_TYPE_WLAN,
system_id->driver_data, NULL);
if (!amilo_rfkill_dev)
return -ENOMEM;

rc = rfkill_register(amilo_rfkill_dev);
if (rc)
goto fail;

return 0;

fail:
rfkill_destroy(amilo_rfkill_dev);
return rc;
}

static int amilo_rfkill_remove(struct platform_device *device)
{
rfkill_unregister(amilo_rfkill_dev);
rfkill_destroy(amilo_rfkill_dev);
return 0;
}

static struct platform_driver amilo_rfkill_driver = {
.driver = {
.name = KBUILD_MODNAME,
.owner = THIS_MODULE,
},
.probe = amilo_rfkill_probe,
.remove = amilo_rfkill_remove,
};

static int __init amilo_rfkill_init(void)
{
int rc;

if (dmi_first_match(amilo_rfkill_id_table) == NULL)
return -ENODEV;

rc = platform_driver_register(&amilo_rfkill_driver);
if (rc)
return rc;

amilo_rfkill_pdev = platform_device_register_simple(KBUILD_MODNAME, -1,
NULL, 0);
if (IS_ERR(amilo_rfkill_pdev)) {
rc = PTR_ERR(amilo_rfkill_pdev);
goto fail;
}

return 0;

fail:
platform_driver_unregister(&amilo_rfkill_driver);
return rc;
}

static void __exit amilo_rfkill_exit(void)
{
platform_device_unregister(amilo_rfkill_pdev);
platform_driver_unregister(&amilo_rfkill_driver);
}

MODULE_AUTHOR("Ben Hutchings <ben@decadent.org.uk>");
MODULE_LICENSE("GPL");
MODULE_DEVICE_TABLE(dmi, amilo_rfkill_id_table);

module_init(amilo_rfkill_init);
module_exit(amilo_rfkill_exit);
5 changes: 0 additions & 5 deletions trunk/drivers/tty/serial/sh-sci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1710,8 +1710,6 @@ static int sci_startup(struct uart_port *port)

dev_dbg(port->dev, "%s(%d)\n", __func__, port->line);

pm_runtime_put_noidle(port->dev);

sci_port_enable(s);

ret = sci_request_irq(s);
Expand Down Expand Up @@ -1739,8 +1737,6 @@ static void sci_shutdown(struct uart_port *port)
sci_free_irq(s);

sci_port_disable(s);

pm_runtime_get_noresume(port->dev);
}

static unsigned int sci_scbrr_calc(unsigned int algo_id, unsigned int bps,
Expand Down Expand Up @@ -2079,7 +2075,6 @@ static int __devinit sci_init_single(struct platform_device *dev,
sci_init_gpios(sci_port);

pm_runtime_irq_safe(&dev->dev);
pm_runtime_get_noresume(&dev->dev);
pm_runtime_enable(&dev->dev);
}

Expand Down

0 comments on commit 4705645

Please sign in to comment.