diff options
author | David S. Miller <davem@davemloft.net> | 2009-06-15 03:02:23 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-15 03:02:23 -0700 |
commit | 9cbc1cb8cd46ce1f7645b9de249b2ce8460129bb (patch) | |
tree | 8d104ec2a459346b99413b0b77421ca7b9936c1a /arch/arm/mach-pxa/spitz.c | |
parent | ca44d6e60f9de26281fda203f58b570e1748c015 (diff) | |
parent | 45e3e1935e2857c54783291107d33323b3ef33c8 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
Documentation/feature-removal-schedule.txt
drivers/scsi/fcoe/fcoe.c
net/core/drop_monitor.c
net/core/net-traces.c
Diffstat (limited to 'arch/arm/mach-pxa/spitz.c')
-rw-r--r-- | arch/arm/mach-pxa/spitz.c | 86 |
1 files changed, 14 insertions, 72 deletions
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index c18e34acafc..dda310fe71c 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c @@ -13,19 +13,11 @@ */ #include <linux/kernel.h> -#include <linux/init.h> #include <linux/platform_device.h> #include <linux/delay.h> -#include <linux/major.h> -#include <linux/fs.h> -#include <linux/interrupt.h> #include <linux/gpio.h> #include <linux/leds.h> -#include <linux/mmc/host.h> #include <linux/mtd/physmap.h> -#include <linux/pm.h> -#include <linux/backlight.h> -#include <linux/io.h> #include <linux/i2c.h> #include <linux/i2c/pca953x.h> #include <linux/spi/spi.h> @@ -34,31 +26,22 @@ #include <linux/mtd/sharpsl.h> #include <asm/setup.h> -#include <asm/memory.h> #include <asm/mach-types.h> -#include <mach/hardware.h> -#include <asm/irq.h> -#include <asm/system.h> - #include <asm/mach/arch.h> -#include <asm/mach/map.h> -#include <asm/mach/irq.h> +#include <asm/mach/sharpsl_param.h> +#include <asm/hardware/scoop.h> + #include <mach/pxa27x.h> #include <mach/pxa27x-udc.h> #include <mach/reset.h> -#include <mach/i2c.h> +#include <plat/i2c.h> #include <mach/irda.h> #include <mach/mmc.h> #include <mach/ohci.h> -#include <mach/udc.h> #include <mach/pxafb.h> #include <mach/pxa2xx_spi.h> #include <mach/spitz.h> -#include <mach/sharpsl.h> - -#include <asm/mach/sharpsl_param.h> -#include <asm/hardware/scoop.h> #include "generic.h" #include "devices.h" @@ -317,13 +300,8 @@ static struct ads7846_platform_data spitz_ads7846_info = { .wait_for_sync = spitz_wait_for_hsync, }; -static void spitz_ads7846_cs(u32 command) -{ - gpio_set_value(SPITZ_GPIO_ADS7846_CS, !(command == PXA2XX_CS_ASSERT)); -} - static struct pxa2xx_spi_chip spitz_ads7846_chip = { - .cs_control = spitz_ads7846_cs, + .gpio_cs = SPITZ_GPIO_ADS7846_CS, }; static void spitz_bl_kick_battery(void) @@ -347,22 +325,12 @@ static struct corgi_lcd_platform_data spitz_lcdcon_info = { .kick_battery = spitz_bl_kick_battery, }; -static void spitz_lcdcon_cs(u32 command) -{ - gpio_set_value(SPITZ_GPIO_LCDCON_CS, !(command == PXA2XX_CS_ASSERT)); -} - static struct pxa2xx_spi_chip spitz_lcdcon_chip = { - .cs_control = spitz_lcdcon_cs, + .gpio_cs = SPITZ_GPIO_LCDCON_CS, }; -static void spitz_max1111_cs(u32 command) -{ - gpio_set_value(SPITZ_GPIO_MAX1111_CS, !(command == PXA2XX_CS_ASSERT)); -} - static struct pxa2xx_spi_chip spitz_max1111_chip = { - .cs_control = spitz_max1111_cs, + .gpio_cs = SPITZ_GPIO_MAX1111_CS, }; static struct spi_board_info spitz_spi_devices[] = { @@ -392,30 +360,6 @@ static struct spi_board_info spitz_spi_devices[] = { static void __init spitz_init_spi(void) { - int err; - - err = gpio_request(SPITZ_GPIO_ADS7846_CS, "ADS7846_CS"); - if (err) - return; - - err = gpio_request(SPITZ_GPIO_LCDCON_CS, "LCDCON_CS"); - if (err) - goto err_free_1; - - err = gpio_request(SPITZ_GPIO_MAX1111_CS, "MAX1111_CS"); - if (err) - goto err_free_2; - - err = gpio_direction_output(SPITZ_GPIO_ADS7846_CS, 1); - if (err) - goto err_free_3; - err = gpio_direction_output(SPITZ_GPIO_LCDCON_CS, 1); - if (err) - goto err_free_3; - err = gpio_direction_output(SPITZ_GPIO_MAX1111_CS, 1); - if (err) - goto err_free_3; - if (machine_is_akita()) { spitz_lcdcon_info.gpio_backlight_cont = AKITA_GPIO_BACKLIGHT_CONT; spitz_lcdcon_info.gpio_backlight_on = AKITA_GPIO_BACKLIGHT_ON; @@ -423,14 +367,6 @@ static void __init spitz_init_spi(void) pxa2xx_set_spi_info(2, &spitz_spi_info); spi_register_board_info(ARRAY_AND_SIZE(spitz_spi_devices)); - return; - -err_free_3: - gpio_free(SPITZ_GPIO_MAX1111_CS); -err_free_2: - gpio_free(SPITZ_GPIO_LCDCON_CS); -err_free_1: - gpio_free(SPITZ_GPIO_ADS7846_CS); } #else static inline void spitz_init_spi(void) {} @@ -531,9 +467,15 @@ static int spitz_ohci_init(struct device *dev) return gpio_direction_output(SPITZ_GPIO_USB_HOST, 1); } +static void spitz_ohci_exit(struct device *dev) +{ + gpio_free(SPITZ_GPIO_USB_HOST); +} + static struct pxaohci_platform_data spitz_ohci_platform_data = { .port_mode = PMM_NPS_MODE, .init = spitz_ohci_init, + .exit = spitz_ohci_exit, .flags = ENABLE_PORT_ALL | NO_OC_PROTECTION, .power_budget = 150, }; @@ -731,7 +673,7 @@ static void spitz_restart(char mode, const char *cmd) static void __init common_init(void) { - init_gpio_reset(SPITZ_GPIO_ON_RESET, 1); + init_gpio_reset(SPITZ_GPIO_ON_RESET, 1, 0); pm_power_off = spitz_poweroff; arm_pm_restart = spitz_restart; |