aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/tosa.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/tosa.c')
-rw-r--r--arch/arm/mach-pxa/tosa.c74
1 files changed, 74 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
index 224897a67d15..3332e5d0356c 100644
--- a/arch/arm/mach-pxa/tosa.c
+++ b/arch/arm/mach-pxa/tosa.c
@@ -25,6 +25,7 @@
25#include <linux/mfd/tmio.h> 25#include <linux/mfd/tmio.h>
26#include <linux/mtd/nand.h> 26#include <linux/mtd/nand.h>
27#include <linux/mtd/partitions.h> 27#include <linux/mtd/partitions.h>
28#include <linux/mtd/physmap.h>
28#include <linux/pm.h> 29#include <linux/pm.h>
29#include <linux/gpio_keys.h> 30#include <linux/gpio_keys.h>
30#include <linux/input.h> 31#include <linux/input.h>
@@ -733,6 +734,45 @@ static void tosa_tc6393xb_teardown(struct platform_device *dev)
733 gpio_free(TOSA_GPIO_CARD_VCC_ON); 734 gpio_free(TOSA_GPIO_CARD_VCC_ON);
734} 735}
735 736
737#ifdef CONFIG_MFD_TC6393XB
738static struct fb_videomode tosa_tc6393xb_lcd_mode[] = {
739 {
740 .xres = 480,
741 .yres = 640,
742 .pixclock = 0x002cdf00,/* PLL divisor */
743 .left_margin = 0x004c,
744 .right_margin = 0x005b,
745 .upper_margin = 0x0001,
746 .lower_margin = 0x000d,
747 .hsync_len = 0x0002,
748 .vsync_len = 0x0001,
749 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
750 .vmode = FB_VMODE_NONINTERLACED,
751 },{
752 .xres = 240,
753 .yres = 320,
754 .pixclock = 0x00e7f203,/* PLL divisor */
755 .left_margin = 0x0024,
756 .right_margin = 0x002f,
757 .upper_margin = 0x0001,
758 .lower_margin = 0x000d,
759 .hsync_len = 0x0002,
760 .vsync_len = 0x0001,
761 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
762 .vmode = FB_VMODE_NONINTERLACED,
763 }
764};
765
766static struct tmio_fb_data tosa_tc6393xb_fb_config = {
767 .lcd_set_power = tc6393xb_lcd_set_power,
768 .lcd_mode = tc6393xb_lcd_mode,
769 .num_modes = ARRAY_SIZE(tosa_tc6393xb_lcd_mode),
770 .modes = &tosa_tc6393xb_lcd_mode[0],
771 .height = 82,
772 .width = 60,
773};
774#endif
775
736static struct tc6393xb_platform_data tosa_tc6393xb_data = { 776static struct tc6393xb_platform_data tosa_tc6393xb_data = {
737 .scr_pll2cr = 0x0cc1, 777 .scr_pll2cr = 0x0cc1,
738 .scr_gper = 0x3300, 778 .scr_gper = 0x3300,
@@ -748,6 +788,9 @@ static struct tc6393xb_platform_data tosa_tc6393xb_data = {
748 .resume = tosa_tc6393xb_resume, 788 .resume = tosa_tc6393xb_resume,
749 789
750 .nand_data = &tosa_tc6393xb_nand_config, 790 .nand_data = &tosa_tc6393xb_nand_config,
791#ifdef CONFIG_MFD_TC6393XB
792 .fb_data = &tosa_tc6393xb_fb_config,
793#endif
751 794
752 .resume_restore = 1, 795 .resume_restore = 1,
753}; 796};
@@ -789,6 +832,36 @@ static struct spi_board_info spi_board_info[] __initdata = {
789 }, 832 },
790}; 833};
791 834
835static struct mtd_partition sharpsl_rom_parts[] = {
836 {
837 .name ="Boot PROM Filesystem",
838 .offset = 0x00160000,
839 .size = MTDPART_SIZ_FULL,
840 },
841};
842
843static struct physmap_flash_data sharpsl_rom_data = {
844 .width = 2,
845 .nr_parts = ARRAY_SIZE(sharpsl_rom_parts),
846 .parts = sharpsl_rom_parts,
847};
848
849static struct resource sharpsl_rom_resources[] = {
850 {
851 .start = 0x00000000,
852 .end = 0x007fffff,
853 .flags = IORESOURCE_MEM,
854 },
855};
856
857static struct platform_device sharpsl_rom_device = {
858 .name = "physmap-flash",
859 .id = -1,
860 .resource = sharpsl_rom_resources,
861 .num_resources = ARRAY_SIZE(sharpsl_rom_resources),
862 .dev.platform_data = &sharpsl_rom_data,
863};
864
792static struct platform_device *devices[] __initdata = { 865static struct platform_device *devices[] __initdata = {
793 &tosascoop_device, 866 &tosascoop_device,
794 &tosascoop_jc_device, 867 &tosascoop_jc_device,
@@ -798,6 +871,7 @@ static struct platform_device *devices[] __initdata = {
798 &tosa_gpio_keys_device, 871 &tosa_gpio_keys_device,
799 &tosaled_device, 872 &tosaled_device,
800 &tosa_bt_device, 873 &tosa_bt_device,
874 &sharpsl_rom_device,
801}; 875};
802 876
803static void tosa_poweroff(void) 877static void tosa_poweroff(void)