Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298682
b: refs/heads/master
c: 7bd9523
h: refs/heads/master
v: v3
  • Loading branch information
Nicolas Ferre committed Apr 2, 2012
1 parent 021dc08 commit f3d7ad3
Show file tree
Hide file tree
Showing 16 changed files with 35 additions and 105 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: 98f0ec0dd4e0c96fcc7bc6dae08007820b1134a8
refs/heads/master: 7bd9523969299f4c845615eade5e523f840dc34c
2 changes: 2 additions & 0 deletions trunk/arch/arm/mach-at91/at91sam9x5.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ static struct clk_lookup periph_clocks_lookups[] = {
CLKDEV_CON_DEV_ID("usart", "f8028000.serial", &usart3_clk),
CLKDEV_CON_DEV_ID("t0_clk", "f8008000.timer", &tcb0_clk),
CLKDEV_CON_DEV_ID("t0_clk", "f800c000.timer", &tcb0_clk),
CLKDEV_CON_DEV_ID("dma_clk", "ffffec00.dma-controller", &dma0_clk),
CLKDEV_CON_DEV_ID("dma_clk", "ffffee00.dma-controller", &dma1_clk),
CLKDEV_CON_ID("pioA", &pioAB_clk),
CLKDEV_CON_ID("pioB", &pioAB_clk),
CLKDEV_CON_ID("pioC", &pioCD_clk),
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/arm/mach-imx/clock-imx27.c
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,6 @@ static struct clk_lookup lookups[] = {
_REGISTER_CLOCK(NULL, "dma", dma_clk)
_REGISTER_CLOCK(NULL, "rtic", rtic_clk)
_REGISTER_CLOCK(NULL, "brom", brom_clk)
_REGISTER_CLOCK(NULL, "emma", emma_clk)
_REGISTER_CLOCK("m2m-emmaprp.0", NULL, emma_clk)
_REGISTER_CLOCK(NULL, "slcdc", slcdc_clk)
_REGISTER_CLOCK("imx27-fec.0", NULL, fec_clk)
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-imx/clock-imx35.c
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ static struct clk_lookup lookups[] = {
_REGISTER_CLOCK("imx2-wdt.0", NULL, wdog_clk)
_REGISTER_CLOCK(NULL, "max", max_clk)
_REGISTER_CLOCK(NULL, "audmux", audmux_clk)
_REGISTER_CLOCK("mx3-camera.0", NULL, csi_clk)
_REGISTER_CLOCK(NULL, "csi", csi_clk)
_REGISTER_CLOCK(NULL, "iim", iim_clk)
_REGISTER_CLOCK(NULL, "gpu2d", gpu2d_clk)
_REGISTER_CLOCK("mxc_nand.0", NULL, nfc_clk)
Expand Down
9 changes: 0 additions & 9 deletions trunk/arch/arm/mach-imx/mach-armadillo5x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
#include <linux/usb/otg.h>
#include <linux/usb/ulpi.h>
#include <linux/delay.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h>

#include <mach/hardware.h>
#include <asm/mach-types.h>
Expand Down Expand Up @@ -481,11 +479,6 @@ static struct platform_device *devices[] __initdata = {
&armadillo5x0_smc911x_device,
};

static struct regulator_consumer_supply dummy_supplies[] = {
REGULATOR_SUPPLY("vdd33a", "smsc911x"),
REGULATOR_SUPPLY("vddvario", "smsc911x"),
};

/*
* Perform board specific initializations
*/
Expand All @@ -496,8 +489,6 @@ static void __init armadillo5x0_init(void)
mxc_iomux_setup_multiple_pins(armadillo5x0_pins,
ARRAY_SIZE(armadillo5x0_pins), "armadillo5x0");

regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));

platform_add_devices(devices, ARRAY_SIZE(devices));
imx_add_gpio_keys(&armadillo5x0_button_data);
imx31_add_imx_i2c1(NULL);
Expand Down
9 changes: 0 additions & 9 deletions trunk/arch/arm/mach-imx/mach-kzm_arm11_01.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
#include <linux/serial_8250.h>
#include <linux/smsc911x.h>
#include <linux/types.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h>

#include <asm/irq.h>
#include <asm/mach-types.h>
Expand Down Expand Up @@ -168,11 +166,6 @@ static struct platform_device kzm_smsc9118_device = {
},
};

static struct regulator_consumer_supply dummy_supplies[] = {
REGULATOR_SUPPLY("vdd33a", "smsc911x"),
REGULATOR_SUPPLY("vddvario", "smsc911x"),
};

static int __init kzm_init_smsc9118(void)
{
/*
Expand All @@ -182,8 +175,6 @@ static int __init kzm_init_smsc9118(void)
gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO1_2), "smsc9118-int");
gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO1_2));

regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));

return platform_device_register(&kzm_smsc9118_device);
}
#else
Expand Down
9 changes: 0 additions & 9 deletions trunk/arch/arm/mach-imx/mach-mx31lilly.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
#include <linux/mfd/mc13783.h>
#include <linux/usb/otg.h>
#include <linux/usb/ulpi.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h>

#include <asm/mach-types.h>
#include <asm/mach/arch.h>
Expand Down Expand Up @@ -244,11 +242,6 @@ static struct platform_device *devices[] __initdata = {
static int mx31lilly_baseboard;
core_param(mx31lilly_baseboard, mx31lilly_baseboard, int, 0444);

static struct regulator_consumer_supply dummy_supplies[] = {
REGULATOR_SUPPLY("vdd33a", "smsc911x"),
REGULATOR_SUPPLY("vddvario", "smsc911x"),
};

static void __init mx31lilly_board_init(void)
{
imx31_soc_init();
Expand Down Expand Up @@ -287,8 +280,6 @@ static void __init mx31lilly_board_init(void)
imx31_add_spi_imx1(&spi1_pdata);
spi_register_board_info(&mc13783_dev, 1);

regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));

platform_add_devices(devices, ARRAY_SIZE(devices));

/* USB */
Expand Down
9 changes: 0 additions & 9 deletions trunk/arch/arm/mach-imx/mach-mx31lite.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
#include <linux/usb/ulpi.h>
#include <linux/mtd/physmap.h>
#include <linux/delay.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h>

#include <asm/mach-types.h>
#include <asm/mach/arch.h>
Expand Down Expand Up @@ -228,11 +226,6 @@ void __init mx31lite_map_io(void)
static int mx31lite_baseboard;
core_param(mx31lite_baseboard, mx31lite_baseboard, int, 0444);

static struct regulator_consumer_supply dummy_supplies[] = {
REGULATOR_SUPPLY("vdd33a", "smsc911x"),
REGULATOR_SUPPLY("vddvario", "smsc911x"),
};

static void __init mx31lite_init(void)
{
int ret;
Expand Down Expand Up @@ -266,8 +259,6 @@ static void __init mx31lite_init(void)
if (usbh2_pdata.otg)
imx31_add_mxc_ehci_hs(2, &usbh2_pdata);

regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));

/* SMSC9117 IRQ pin */
ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_SFS6), "sms9117-irq");
if (ret)
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-imx/mach-mx35_3ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ static struct i2c_board_info __initdata i2c_devices_3ds[] = {
static int lcd_power_gpio = -ENXIO;

static int mc9s08dz60_gpiochip_match(struct gpio_chip *chip,
const void *data)
void *data)
{
return !strcmp(chip->label, data);
}
Expand Down
8 changes: 0 additions & 8 deletions trunk/arch/arm/mach-imx/mach-mx53_ard.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
#include <linux/delay.h>
#include <linux/gpio.h>
#include <linux/smsc911x.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h>

#include <mach/common.h>
#include <mach/hardware.h>
Expand Down Expand Up @@ -216,11 +214,6 @@ static int weim_cs_config(void)
return 0;
}

static struct regulator_consumer_supply dummy_supplies[] = {
REGULATOR_SUPPLY("vdd33a", "smsc911x"),
REGULATOR_SUPPLY("vddvario", "smsc911x"),
};

void __init imx53_ard_common_init(void)
{
mxc_iomux_v3_setup_multiple_pads(mx53_ard_pads,
Expand All @@ -239,7 +232,6 @@ static void __init mx53_ard_board_init(void)

imx53_ard_common_init();
mx53_ard_io_init();
regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
platform_add_devices(devices, ARRAY_SIZE(devices));

imx53_add_sdhci_esdhc_imx(0, &mx53_ard_sd1_data);
Expand Down
4 changes: 0 additions & 4 deletions trunk/arch/arm/mach-sa1100/collie.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,10 +313,6 @@ static struct sa1100fb_mach_info collie_lcd_info = {

.lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act,
.lccr3 = LCCR3_OutEnH | LCCR3_PixRsEdg | LCCR3_ACBsDiv(2),

#ifdef CONFIG_BACKLIGHT_LOCOMO
.lcd_power = locomolcd_power
#endif
};

static void __init collie_init(void)
Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/arm/mach-sa1100/include/mach/collie.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* arch/arm/mach-sa1100/include/mach/collie.h
*
* This file contains the hardware specific definitions for Collie
* This file contains the hardware specific definitions for Assabet
* Only include this file from SA1100-specific files.
*
* ChangeLog:
Expand All @@ -13,7 +13,6 @@
#ifndef __ASM_ARCH_COLLIE_H
#define __ASM_ARCH_COLLIE_H

extern void locomolcd_power(int on);

#define COLLIE_SCOOP_GPIO_BASE (GPIO_MAX + 1)
#define COLLIE_GPIO_CHARGE_ON (COLLIE_SCOOP_GPIO_BASE + 0)
Expand Down
10 changes: 5 additions & 5 deletions trunk/arch/arm/mach-versatile/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ static struct resource pre_mem = {
.flags = IORESOURCE_MEM | IORESOURCE_PREFETCH,
};

static int __init pci_versatile_setup_resources(struct pci_sys_data *sys)
static int __init pci_versatile_setup_resources(struct list_head *resources)
{
int ret = 0;

Expand Down Expand Up @@ -218,9 +218,9 @@ static int __init pci_versatile_setup_resources(struct pci_sys_data *sys)
* the mem resource for this bus
* the prefetch mem resource for this bus
*/
pci_add_resource_offset(&sys->resources, &io_mem, sys->io_offset);
pci_add_resource_offset(&sys->resources, &non_mem, sys->mem_offset);
pci_add_resource_offset(&sys->resources, &pre_mem, sys->mem_offset);
pci_add_resource_offset(resources, &io_mem, sys->io_offset);
pci_add_resource_offset(resources, &non_mem, sys->mem_offset);
pci_add_resource_offset(resources, &pre_mem, sys->mem_offset);

goto out;

Expand Down Expand Up @@ -249,7 +249,7 @@ int __init pci_versatile_setup(int nr, struct pci_sys_data *sys)

if (nr == 0) {
sys->mem_offset = 0;
ret = pci_versatile_setup_resources(sys);
ret = pci_versatile_setup_resources(&sys->resources);
if (ret < 0) {
printk("pci_versatile_setup: resources... oops?\n");
goto out;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/plat-mxc/3ds_debugboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ static struct smsc911x_platform_config smsc911x_config = {

static struct platform_device smsc_lan9217_device = {
.name = "smsc911x",
.id = -1,
.id = 0,
.dev = {
.platform_data = &smsc911x_config,
},
Expand Down
59 changes: 15 additions & 44 deletions trunk/drivers/gpio/gpio-tegra.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/gpio.h>
#include <linux/of_device.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/module.h>
#include <linux/irqdomain.h>
Expand All @@ -37,8 +37,7 @@
#define GPIO_PORT(x) (((x) >> 3) & 0x3)
#define GPIO_BIT(x) ((x) & 0x7)

#define GPIO_REG(x) (GPIO_BANK(x) * tegra_gpio_bank_stride + \
GPIO_PORT(x) * 4)
#define GPIO_REG(x) (GPIO_BANK(x) * 0x80 + GPIO_PORT(x) * 4)

#define GPIO_CNF(x) (GPIO_REG(x) + 0x00)
#define GPIO_OE(x) (GPIO_REG(x) + 0x10)
Expand All @@ -49,12 +48,12 @@
#define GPIO_INT_LVL(x) (GPIO_REG(x) + 0x60)
#define GPIO_INT_CLR(x) (GPIO_REG(x) + 0x70)

#define GPIO_MSK_CNF(x) (GPIO_REG(x) + tegra_gpio_upper_offset + 0x00)
#define GPIO_MSK_OE(x) (GPIO_REG(x) + tegra_gpio_upper_offset + 0x10)
#define GPIO_MSK_OUT(x) (GPIO_REG(x) + tegra_gpio_upper_offset + 0X20)
#define GPIO_MSK_INT_STA(x) (GPIO_REG(x) + tegra_gpio_upper_offset + 0x40)
#define GPIO_MSK_INT_ENB(x) (GPIO_REG(x) + tegra_gpio_upper_offset + 0x50)
#define GPIO_MSK_INT_LVL(x) (GPIO_REG(x) + tegra_gpio_upper_offset + 0x60)
#define GPIO_MSK_CNF(x) (GPIO_REG(x) + 0x800)
#define GPIO_MSK_OE(x) (GPIO_REG(x) + 0x810)
#define GPIO_MSK_OUT(x) (GPIO_REG(x) + 0X820)
#define GPIO_MSK_INT_STA(x) (GPIO_REG(x) + 0x840)
#define GPIO_MSK_INT_ENB(x) (GPIO_REG(x) + 0x850)
#define GPIO_MSK_INT_LVL(x) (GPIO_REG(x) + 0x860)

#define GPIO_INT_LVL_MASK 0x010101
#define GPIO_INT_LVL_EDGE_RISING 0x000101
Expand All @@ -79,8 +78,6 @@ struct tegra_gpio_bank {
static struct irq_domain *irq_domain;
static void __iomem *regs;
static u32 tegra_gpio_bank_count;
static u32 tegra_gpio_bank_stride;
static u32 tegra_gpio_upper_offset;
static struct tegra_gpio_bank *tegra_gpio_banks;

static inline void tegra_gpio_writel(u32 val, u32 reg)
Expand Down Expand Up @@ -336,26 +333,6 @@ static struct irq_chip tegra_gpio_irq_chip = {
#endif
};

struct tegra_gpio_soc_config {
u32 bank_stride;
u32 upper_offset;
};

static struct tegra_gpio_soc_config tegra20_gpio_config = {
.bank_stride = 0x80,
.upper_offset = 0x800,
};

static struct tegra_gpio_soc_config tegra30_gpio_config = {
.bank_stride = 0x100,
.upper_offset = 0x80,
};

static struct of_device_id tegra_gpio_of_match[] __devinitdata = {
{ .compatible = "nvidia,tegra30-gpio", .data = &tegra30_gpio_config },
{ .compatible = "nvidia,tegra20-gpio", .data = &tegra20_gpio_config },
{ },
};

/* This lock class tells lockdep that GPIO irqs are in a different
* category than their parents, so it won't report false recursion.
Expand All @@ -364,24 +341,13 @@ static struct lock_class_key gpio_lock_class;

static int __devinit tegra_gpio_probe(struct platform_device *pdev)
{
const struct of_device_id *match;
struct tegra_gpio_soc_config *config;
int irq_base;
struct resource *res;
struct tegra_gpio_bank *bank;
int gpio;
int i;
int j;

match = of_match_device(tegra_gpio_of_match, &pdev->dev);
if (match)
config = (struct tegra_gpio_soc_config *)match->data;
else
config = &tegra20_gpio_config;

tegra_gpio_bank_stride = config->bank_stride;
tegra_gpio_upper_offset = config->upper_offset;

for (;;) {
res = platform_get_resource(pdev, IORESOURCE_IRQ, tegra_gpio_bank_count);
if (!res)
Expand Down Expand Up @@ -436,7 +402,7 @@ static int __devinit tegra_gpio_probe(struct platform_device *pdev)
return -ENODEV;
}

for (i = 0; i < tegra_gpio_bank_count; i++) {
for (i = 0; i < 7; i++) {
for (j = 0; j < 4; j++) {
int gpio = tegra_gpio_compose(i, j, 0);
tegra_gpio_writel(0x00, GPIO_INT_ENB(gpio));
Expand Down Expand Up @@ -475,6 +441,11 @@ static int __devinit tegra_gpio_probe(struct platform_device *pdev)
return 0;
}

static struct of_device_id tegra_gpio_of_match[] __devinitdata = {
{ .compatible = "nvidia,tegra20-gpio", },
{ },
};

static struct platform_driver tegra_gpio_driver = {
.driver = {
.name = "tegra-gpio",
Expand Down Expand Up @@ -514,7 +485,7 @@ static int dbg_gpio_show(struct seq_file *s, void *unused)
int i;
int j;

for (i = 0; i < tegra_gpio_bank_count; i++) {
for (i = 0; i < 7; i++) {
for (j = 0; j < 4; j++) {
int gpio = tegra_gpio_compose(i, j, 0);
seq_printf(s,
Expand Down
Loading

0 comments on commit f3d7ad3

Please sign in to comment.