diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-pxa/include/mach/tosa.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-pxa/tosa.c | 21 |
2 files changed, 23 insertions, 1 deletions
diff --git a/arch/arm/mach-pxa/include/mach/tosa.h b/arch/arm/mach-pxa/include/mach/tosa.h index 8bce6d8615b9..4df2d38507dc 100644 --- a/arch/arm/mach-pxa/include/mach/tosa.h +++ b/arch/arm/mach-pxa/include/mach/tosa.h | |||
@@ -193,4 +193,7 @@ | |||
193 | #define TOSA_KEY_MAIL KEY_MAIL | 193 | #define TOSA_KEY_MAIL KEY_MAIL |
194 | #endif | 194 | #endif |
195 | 195 | ||
196 | struct spi_device; | ||
197 | extern int tosa_bl_enable(struct spi_device *spi, int enable); | ||
198 | |||
196 | #endif /* _ASM_ARCH_TOSA_H_ */ | 199 | #endif /* _ASM_ARCH_TOSA_H_ */ |
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index a6c4694359ca..224897a67d15 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/gpio.h> | 31 | #include <linux/gpio.h> |
32 | #include <linux/pda_power.h> | 32 | #include <linux/pda_power.h> |
33 | #include <linux/rfkill.h> | 33 | #include <linux/rfkill.h> |
34 | #include <linux/spi/spi.h> | ||
34 | 35 | ||
35 | #include <asm/setup.h> | 36 | #include <asm/setup.h> |
36 | #include <asm/mach-types.h> | 37 | #include <asm/mach-types.h> |
@@ -42,6 +43,7 @@ | |||
42 | #include <mach/mmc.h> | 43 | #include <mach/mmc.h> |
43 | #include <mach/udc.h> | 44 | #include <mach/udc.h> |
44 | #include <mach/tosa_bt.h> | 45 | #include <mach/tosa_bt.h> |
46 | #include <mach/pxa2xx_spi.h> | ||
45 | 47 | ||
46 | #include <asm/mach/arch.h> | 48 | #include <asm/mach/arch.h> |
47 | #include <mach/tosa.h> | 49 | #include <mach/tosa.h> |
@@ -612,7 +614,7 @@ static int tosa_tc6393xb_enable(struct platform_device *dev) | |||
612 | rc = gpio_request(TOSA_GPIO_TC6393XB_SUSPEND, "tc6393xb #suspend"); | 614 | rc = gpio_request(TOSA_GPIO_TC6393XB_SUSPEND, "tc6393xb #suspend"); |
613 | if (rc) | 615 | if (rc) |
614 | goto err_req_suspend; | 616 | goto err_req_suspend; |
615 | rc = gpio_request(TOSA_GPIO_TC6393XB_L3V_ON, "l3v"); | 617 | rc = gpio_request(TOSA_GPIO_TC6393XB_L3V_ON, "tc6393xb l3v"); |
616 | if (rc) | 618 | if (rc) |
617 | goto err_req_l3v; | 619 | goto err_req_l3v; |
618 | rc = gpio_direction_output(TOSA_GPIO_TC6393XB_L3V_ON, 0); | 620 | rc = gpio_direction_output(TOSA_GPIO_TC6393XB_L3V_ON, 0); |
@@ -772,6 +774,20 @@ static struct platform_device tosa_bt_device = { | |||
772 | .dev.platform_data = &tosa_bt_data, | 774 | .dev.platform_data = &tosa_bt_data, |
773 | }; | 775 | }; |
774 | 776 | ||
777 | static struct pxa2xx_spi_master pxa_ssp_master_info = { | ||
778 | .num_chipselect = 1, | ||
779 | }; | ||
780 | |||
781 | static struct spi_board_info spi_board_info[] __initdata = { | ||
782 | { | ||
783 | .modalias = "tosa-lcd", | ||
784 | // .platform_data | ||
785 | .max_speed_hz = 28750, | ||
786 | .bus_num = 2, | ||
787 | .chip_select = 0, | ||
788 | .mode = SPI_MODE_0, | ||
789 | }, | ||
790 | }; | ||
775 | 791 | ||
776 | static struct platform_device *devices[] __initdata = { | 792 | static struct platform_device *devices[] __initdata = { |
777 | &tosascoop_device, | 793 | &tosascoop_device, |
@@ -826,6 +842,9 @@ static void __init tosa_init(void) | |||
826 | pxa_set_i2c_info(NULL); | 842 | pxa_set_i2c_info(NULL); |
827 | platform_scoop_config = &tosa_pcmcia_config; | 843 | platform_scoop_config = &tosa_pcmcia_config; |
828 | 844 | ||
845 | pxa2xx_set_spi_info(2, &pxa_ssp_master_info); | ||
846 | spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); | ||
847 | |||
829 | clk_add_alias("CLK_CK3P6MI", &tc6393xb_device.dev, "GPIO11_CLK", NULL); | 848 | clk_add_alias("CLK_CK3P6MI", &tc6393xb_device.dev, "GPIO11_CLK", NULL); |
830 | 849 | ||
831 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 850 | platform_add_devices(devices, ARRAY_SIZE(devices)); |