Skip to content

Commit

Permalink
Merge branch 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git…
Browse files Browse the repository at this point in the history
…/ycmiao/pxa-linux-2.6 into devel-stable

Conflicts:
	arch/arm/mach-pxa/tosa.c
  • Loading branch information
Russell King committed Mar 26, 2011
2 parents 16c29da + 5898eb7 commit 938c0ac
Show file tree
Hide file tree
Showing 51 changed files with 514 additions and 582 deletions.
2 changes: 0 additions & 2 deletions arch/arm/include/asm/mach/udc_pxa2xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ struct pxa2xx_udc_mach_info {
* VBUS IRQ and omit the methods above. Store the GPIO number
* here. Note that sometimes the signals go through inverters...
*/
bool gpio_vbus_inverted;
int gpio_vbus; /* high == vbus present */
bool gpio_pullup_inverted;
int gpio_pullup; /* high == pullup activated */
};
Expand Down
8 changes: 4 additions & 4 deletions arch/arm/mach-pxa/am200epd.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ static int am200_init_gpio_regs(struct metronomefb_par *par)
return 0;

err_req_gpio:
while (i > 0)
gpio_free(gpios[i--]);
while (--i >= 0)
gpio_free(gpios[i]);

return err;
}
Expand Down Expand Up @@ -194,7 +194,7 @@ static struct notifier_block am200_fb_notif = {
};

/* this gets called as part of our init. these steps must be done now so
* that we can use set_pxa_fb_info */
* that we can use pxa_set_fb_info */
static void __init am200_presetup_fb(void)
{
int fw;
Expand Down Expand Up @@ -249,7 +249,7 @@ static void __init am200_presetup_fb(void)
/* we divide since we told the LCD controller we're 16bpp */
am200_fb_info.modes->xres /= 2;

set_pxa_fb_info(&am200_fb_info);
pxa_set_fb_info(NULL, &am200_fb_info);

}

Expand Down
13 changes: 7 additions & 6 deletions arch/arm/mach-pxa/am300epd.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,7 @@ static int am300_init_gpio_regs(struct broadsheetfb_par *par)
if (err) {
dev_err(&am300_device->dev, "failed requesting "
"gpio %d, err=%d\n", i, err);
while (i >= DB0_GPIO_PIN)
gpio_free(i--);
i = ARRAY_SIZE(gpios) - 1;
goto err_req_gpio;
goto err_req_gpio2;
}
}

Expand Down Expand Up @@ -159,9 +156,13 @@ static int am300_init_gpio_regs(struct broadsheetfb_par *par)

return 0;

err_req_gpio2:
while (--i >= DB0_GPIO_PIN)
gpio_free(i);
i = ARRAY_SIZE(gpios);
err_req_gpio:
while (i > 0)
gpio_free(gpios[i--]);
while (--i >= 0)
gpio_free(gpios[i]);

return err;
}
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-pxa/balloon3.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ static void __init balloon3_lcd_init(void)
}

balloon3_lcd_screen.pxafb_backlight_power = balloon3_backlight_power;
set_pxa_fb_info(&balloon3_lcd_screen);
pxa_set_fb_info(NULL, &balloon3_lcd_screen);
return;

err2:
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-pxa/cm-x2xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ __setup("monitor=", cmx2xx_set_display);

static void __init cmx2xx_init_display(void)
{
set_pxa_fb_info(cmx2xx_display);
pxa_set_fb_info(NULL, cmx2xx_display);
}
#else
static inline void cmx2xx_init_display(void) {}
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-pxa/cm-x300.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ static struct pxafb_mach_info cm_x300_lcd = {

static void __init cm_x300_init_lcd(void)
{
set_pxa_fb_info(&cm_x300_lcd);
pxa_set_fb_info(NULL, &cm_x300_lcd);
}
#else
static inline void cm_x300_init_lcd(void) {}
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-pxa/colibri-pxa270-income.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ static struct pxafb_mach_info income_lcd_screen = {

static void __init income_lcd_init(void)
{
set_pxa_fb_info(&income_lcd_screen);
pxa_set_fb_info(NULL, &income_lcd_screen);
}
#else
static inline void income_lcd_init(void) {}
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-pxa/colibri-pxa3xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void __init colibri_pxa3xx_init_lcd(int bl_pin)
lcd_bl_pin = bl_pin;
gpio_request(bl_pin, "lcd backlight");
gpio_direction_output(bl_pin, 0);
set_pxa_fb_info(&sharp_lq43_info);
pxa_set_fb_info(NULL, &sharp_lq43_info);
}
#endif

Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-pxa/corgi.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,6 @@ static struct pxaficp_platform_data corgi_ficp_platform_data = {
* USB Device Controller
*/
static struct pxa2xx_udc_mach_info udc_info __initdata = {
.gpio_vbus = -1,
/* no connect GPIO; corgi can't tell connection status */
.gpio_pullup = CORGI_GPIO_USB_PULLUP,
};
Expand Down
9 changes: 2 additions & 7 deletions arch/arm/mach-pxa/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ void __init pxa_set_mci_info(struct pxamci_platform_data *info)

static struct pxa2xx_udc_mach_info pxa_udc_info = {
.gpio_pullup = -1,
.gpio_vbus = -1,
};

void __init pxa_set_udc_info(struct pxa2xx_udc_mach_info *info)
Expand Down Expand Up @@ -188,16 +187,12 @@ struct platform_device pxa_device_fb = {
.resource = pxafb_resources,
};

void __init set_pxa_fb_info(struct pxafb_mach_info *info)
void __init pxa_set_fb_info(struct device *parent, struct pxafb_mach_info *info)
{
pxa_device_fb.dev.parent = parent;
pxa_register_device(&pxa_device_fb, info);
}

void __init set_pxa_fb_parent(struct device *parent_dev)
{
pxa_device_fb.dev.parent = parent_dev;
}

static struct resource pxa_resource_ffuart[] = {
{
.start = 0x40100000,
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-pxa/em-x270.c
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ static struct pxafb_mach_info em_x270_lcd = {

static void __init em_x270_init_lcd(void)
{
set_pxa_fb_info(&em_x270_lcd);
pxa_set_fb_info(NULL, &em_x270_lcd);
}
#else
static inline void em_x270_init_lcd(void) {}
Expand Down
36 changes: 27 additions & 9 deletions arch/arm/mach-pxa/eseries.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/mfd/t7l66xb.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h>
#include <linux/usb/gpio_vbus.h>

#include <video/w100fb.h>

Expand Down Expand Up @@ -51,12 +52,20 @@ void __init eseries_fixup(struct machine_desc *desc,
mi->bank[0].size = (64*1024*1024);
}

struct pxa2xx_udc_mach_info e7xx_udc_mach_info = {
struct gpio_vbus_mach_info e7xx_udc_info = {
.gpio_vbus = GPIO_E7XX_USB_DISC,
.gpio_pullup = GPIO_E7XX_USB_PULLUP,
.gpio_pullup_inverted = 1
};

static struct platform_device e7xx_gpio_vbus = {
.name = "gpio-vbus",
.id = -1,
.dev = {
.platform_data = &e7xx_udc_info,
},
};

struct pxaficp_platform_data e7xx_ficp_platform_data = {
.gpio_pwdown = GPIO_E7XX_IR_OFF,
.transceiver_cap = IR_SIRMODE | IR_OFF,
Expand Down Expand Up @@ -165,6 +174,7 @@ static struct platform_device e330_tc6387xb_device = {

static struct platform_device *e330_devices[] __initdata = {
&e330_tc6387xb_device,
&e7xx_gpio_vbus,
};

static void __init e330_init(void)
Expand All @@ -175,7 +185,6 @@ static void __init e330_init(void)
eseries_register_clks();
eseries_get_tmio_gpios();
platform_add_devices(ARRAY_AND_SIZE(e330_devices));
pxa_set_udc_info(&e7xx_udc_mach_info);
}

MACHINE_START(E330, "Toshiba e330")
Expand Down Expand Up @@ -214,6 +223,7 @@ static struct platform_device e350_t7l66xb_device = {

static struct platform_device *e350_devices[] __initdata = {
&e350_t7l66xb_device,
&e7xx_gpio_vbus,
};

static void __init e350_init(void)
Expand All @@ -224,7 +234,6 @@ static void __init e350_init(void)
eseries_register_clks();
eseries_get_tmio_gpios();
platform_add_devices(ARRAY_AND_SIZE(e350_devices));
pxa_set_udc_info(&e7xx_udc_mach_info);
}

MACHINE_START(E350, "Toshiba e350")
Expand Down Expand Up @@ -333,6 +342,7 @@ static struct platform_device e400_t7l66xb_device = {

static struct platform_device *e400_devices[] __initdata = {
&e400_t7l66xb_device,
&e7xx_gpio_vbus,
};

static void __init e400_init(void)
Expand All @@ -344,9 +354,8 @@ static void __init e400_init(void)
/* Fixme - e400 may have a switched clock */
eseries_register_clks();
eseries_get_tmio_gpios();
set_pxa_fb_info(&e400_pxafb_mach_info);
pxa_set_fb_info(NULL, &e400_pxafb_mach_info);
platform_add_devices(ARRAY_AND_SIZE(e400_devices));
pxa_set_udc_info(&e7xx_udc_mach_info);
}

MACHINE_START(E400, "Toshiba e400")
Expand Down Expand Up @@ -519,6 +528,7 @@ static struct platform_device e740_t7l66xb_device = {
static struct platform_device *e740_devices[] __initdata = {
&e740_fb_device,
&e740_t7l66xb_device,
&e7xx_gpio_vbus,
};

static void __init e740_init(void)
Expand All @@ -532,7 +542,6 @@ static void __init e740_init(void)
"UDCCLK", &pxa25x_device_udc.dev),
eseries_get_tmio_gpios();
platform_add_devices(ARRAY_AND_SIZE(e740_devices));
pxa_set_udc_info(&e7xx_udc_mach_info);
pxa_set_ac97_info(NULL);
pxa_set_ficp_info(&e7xx_ficp_platform_data);
}
Expand Down Expand Up @@ -711,6 +720,7 @@ static struct platform_device e750_tc6393xb_device = {
static struct platform_device *e750_devices[] __initdata = {
&e750_fb_device,
&e750_tc6393xb_device,
&e7xx_gpio_vbus,
};

static void __init e750_init(void)
Expand All @@ -723,7 +733,6 @@ static void __init e750_init(void)
"GPIO11_CLK", NULL),
eseries_get_tmio_gpios();
platform_add_devices(ARRAY_AND_SIZE(e750_devices));
pxa_set_udc_info(&e7xx_udc_mach_info);
pxa_set_ac97_info(NULL);
pxa_set_ficp_info(&e7xx_ficp_platform_data);
}
Expand Down Expand Up @@ -873,12 +882,21 @@ static struct platform_device e800_fb_device = {

/* --------------------------- UDC definitions --------------------------- */

static struct pxa2xx_udc_mach_info e800_udc_mach_info = {
static struct gpio_vbus_mach_info e800_udc_info = {
.gpio_vbus = GPIO_E800_USB_DISC,
.gpio_pullup = GPIO_E800_USB_PULLUP,
.gpio_pullup_inverted = 1
};

static struct platform_device e800_gpio_vbus = {
.name = "gpio-vbus",
.id = -1,
.dev = {
.platform_data = &e800_udc_info,
},
};


/* ----------------- e800 tc6393xb parameters ------------------ */

static struct tc6393xb_platform_data e800_tc6393xb_info = {
Expand Down Expand Up @@ -907,6 +925,7 @@ static struct platform_device e800_tc6393xb_device = {
static struct platform_device *e800_devices[] __initdata = {
&e800_fb_device,
&e800_tc6393xb_device,
&e800_gpio_vbus,
};

static void __init e800_init(void)
Expand All @@ -919,7 +938,6 @@ static void __init e800_init(void)
"GPIO11_CLK", NULL),
eseries_get_tmio_gpios();
platform_add_devices(ARRAY_AND_SIZE(e800_devices));
pxa_set_udc_info(&e800_udc_mach_info);
pxa_set_ac97_info(NULL);
}

Expand Down
12 changes: 6 additions & 6 deletions arch/arm/mach-pxa/ezx.c
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ static void __init a780_init(void)

pxa_set_i2c_info(NULL);

set_pxa_fb_info(&ezx_fb_info_1);
pxa_set_fb_info(NULL, &ezx_fb_info_1);

pxa_set_keypad_info(&a780_keypad_platform_data);

Expand Down Expand Up @@ -853,7 +853,7 @@ static void __init e680_init(void)
pxa_set_i2c_info(NULL);
i2c_register_board_info(0, ARRAY_AND_SIZE(e680_i2c_board_info));

set_pxa_fb_info(&ezx_fb_info_1);
pxa_set_fb_info(NULL, &ezx_fb_info_1);

pxa_set_keypad_info(&e680_keypad_platform_data);

Expand Down Expand Up @@ -918,7 +918,7 @@ static void __init a1200_init(void)
pxa_set_i2c_info(NULL);
i2c_register_board_info(0, ARRAY_AND_SIZE(a1200_i2c_board_info));

set_pxa_fb_info(&ezx_fb_info_2);
pxa_set_fb_info(NULL, &ezx_fb_info_2);

pxa_set_keypad_info(&a1200_keypad_platform_data);

Expand Down Expand Up @@ -1103,7 +1103,7 @@ static void __init a910_init(void)
pxa_set_i2c_info(NULL);
i2c_register_board_info(0, ARRAY_AND_SIZE(a910_i2c_board_info));

set_pxa_fb_info(&ezx_fb_info_2);
pxa_set_fb_info(NULL, &ezx_fb_info_2);

pxa_set_keypad_info(&a910_keypad_platform_data);

Expand Down Expand Up @@ -1173,7 +1173,7 @@ static void __init e6_init(void)
pxa_set_i2c_info(NULL);
i2c_register_board_info(0, ARRAY_AND_SIZE(e6_i2c_board_info));

set_pxa_fb_info(&ezx_fb_info_2);
pxa_set_fb_info(NULL, &ezx_fb_info_2);

pxa_set_keypad_info(&e6_keypad_platform_data);

Expand Down Expand Up @@ -1212,7 +1212,7 @@ static void __init e2_init(void)
pxa_set_i2c_info(NULL);
i2c_register_board_info(0, ARRAY_AND_SIZE(e2_i2c_board_info));

set_pxa_fb_info(&ezx_fb_info_2);
pxa_set_fb_info(NULL, &ezx_fb_info_2);

pxa_set_keypad_info(&e2_keypad_platform_data);

Expand Down
13 changes: 11 additions & 2 deletions arch/arm/mach-pxa/gumstix.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <linux/gpio.h>
#include <linux/err.h>
#include <linux/clk.h>
#include <linux/usb/gpio_vbus.h>

#include <asm/setup.h>
#include <asm/memory.h>
Expand Down Expand Up @@ -106,14 +107,22 @@ static void __init gumstix_mmc_init(void)
#endif

#ifdef CONFIG_USB_GADGET_PXA25X
static struct pxa2xx_udc_mach_info gumstix_udc_info __initdata = {
static struct gpio_vbus_mach_info gumstix_udc_info = {
.gpio_vbus = GPIO_GUMSTIX_USB_GPIOn,
.gpio_pullup = GPIO_GUMSTIX_USB_GPIOx,
};

static struct platform_device gumstix_gpio_vbus = {
.name = "gpio-vbus",
.id = -1,
.dev = {
.platform_data = &gumstix_udc_info,
},
};

static void __init gumstix_udc_init(void)
{
pxa_set_udc_info(&gumstix_udc_info);
platform_device_register(&gumstix_gpio_vbus);
}
#else
static void gumstix_udc_init(void)
Expand Down
Loading

0 comments on commit 938c0ac

Please sign in to comment.