Index: arch/arm/mach-pxa/htcsable/Kconfig =================================================================== --- arch/arm/mach-pxa/htcsable/Kconfig (revision 1250) +++ arch/arm/mach-pxa/htcsable/Kconfig (working copy) @@ -1,27 +1,64 @@ -menuconfig MACH_HW6900 - bool "HTC Sable (hPaq hw69xx)" +menuconfig HTC_HW6X00 + bool "HTC Beetles/Sable (hPaq hw65xx/hw69xx)" select PXA27x select BOARD_IRQ_MAP_BIG select KEYBOARD_GPIO select KEYBOARD_PXA27x help Say Y here if you intend to run this kernel on a - HTC Sable (iPAQ hw691x). Currently there is only basic support - for this PDA. + HTC Beetles or Sable (iPAQ hw651x or hw691x). + Currently there is only basic support for this PDA. +config MACH_HTCBEETLES + bool "HTC Beetles (hPaq hw65xx)" + depends on HTC_HW6X00 + select PXA27x + select BOARD_IRQ_MAP_BIG + select KEYBOARD_GPIO + select KEYBOARD_PXA27x + help + HTC Beetles (iPAQ hw651x) support. + +config MACH_HW6900 + bool "HTC Sable (hPaq hw69xx)" + depends on HTC_HW6X00 + select PXA27x + select BOARD_IRQ_MAP_BIG + select KEYBOARD_GPIO + select KEYBOARD_PXA27x + help + HTC Sable (iPAQ hw691x) support. + config HTCSABLE_LCD - tristate "HTC Sable LCD" - depends on MACH_HW6900 && HTC_ASIC3 && LCD_CLASS_DEVICE + tristate "HTC Beetles/Sable LCD" + depends on HTC_HW6X00 && ( MACH_HW6900 || MACH_HTCBEETLES ) && HTC_ASIC3 && LCD_CLASS_DEVICE help This driver provides support for changing power and brightness on HTC Sable LCD display. config HTCSABLE_BACKLIGHT - bool "HTC Sable Backlight" - depends on MACH_HW6900 && HTC_ASIC3 && BACKLIGHT_CLASS_DEVICE + bool "HTC Beetles/Sable Backlight" + depends on HTC_HW6X00 && ( MACH_HW6900 || MACH_HTCBEETLES ) && HTC_ASIC3 && BACKLIGHT_CLASS_DEVICE help This driver provides support for changing power and brightness on HTC Sable LCD backlight. +config HTCSABLE_ROM + bool "HTC Beetles/Sable ROM" + depends on HTC_HW6X00 && ( MACH_HW6900 || MACH_HTCBEETLES ) && HTC_ASIC3 && MTD + help + This driver provides access to devices' ROM + (where IPL bootloader) is stored. +config HTCSABLE_BT + bool "HTC Beetles/Sable Bluetooth" + depends on HTC_HW6X00 && ( MACH_HW6900 || MACH_HTCBEETLES ) && HTC_ASIC3 && BT + help + This driver provides support for Bluetooth module. + +config HTCSABLE_PHONE + bool "HTC Beetles/Sable Phone" + depends on HTC_HW6X00 && ( MACH_HW6900 || MACH_HTCBEETLES ) && HTC_ASIC3 + help + This driver provides support for Phone module. Index: arch/arm/mach-pxa/htcsable/htcsable_rom.c =================================================================== --- arch/arm/mach-pxa/htcsable/htcsable_rom.c (revision 1250) +++ arch/arm/mach-pxa/htcsable/htcsable_rom.c (working copy) @@ -37,10 +37,8 @@ { int retval = 0; -#if defined(CONFIG_MACH_BLUEANGEL) - if (! machine_is_sable() ) + if (!(machine_is_hw6900() || machine_is_htcbeetles())) return -ENODEV; -#endif sable_map.virt = ioremap(sable_map.phys, sable_map.size); if (!sable_map.virt) { Index: arch/arm/mach-pxa/htcsable/htcsable.c =================================================================== --- arch/arm/mach-pxa/htcsable/htcsable.c (revision 1250) +++ arch/arm/mach-pxa/htcsable/htcsable.c (working copy) @@ -33,8 +33,13 @@ #include "../generic.h" +#ifdef CONFIG_HTCSABLE_BT #include "htcsable_bt.h" +#endif + +#ifdef CONFIG_HTCSABLE_PHONE #include "htcsable_phone.h" +#endif /* * * Bluetooth - Relies on other loadable modules, like ASIC3 and Core, @@ -43,6 +48,7 @@ * * bluetooth (obviously). * */ +#ifdef CONFIG_HTCSABLE_BT static struct htcsable_bt_funcs bt_funcs; static void @@ -51,7 +57,9 @@ if (bt_funcs.configure != NULL) bt_funcs.configure( state ); } +#endif +#ifdef CONFIG_HTCSABLE_PHONE static struct htcsable_phone_funcs phone_funcs; static void @@ -60,6 +68,7 @@ if (phone_funcs.configure != NULL) phone_funcs.configure( state ); } +#endif static struct pxafb_mode_info htcsable_lcd_modes[] = { { @@ -102,6 +111,7 @@ /* Bluetooth */ +#ifdef CONFIG_HTCSABLE_BT static struct platform_device htcsable_bt = { .name = "htcsable_bt", .id = -1, @@ -109,7 +119,9 @@ .platform_data = &bt_funcs, }, }; +#endif +#ifdef CONFIG_HTCSABLE_PHONE static struct platform_device htcsable_phone = { .name = "htcsable_phone", .id = -1, @@ -117,8 +129,8 @@ .platform_data = &phone_funcs, }, }; +#endif - static struct platform_device *htcsable_asic3_devices[] __initdata = { &htcsable_ts, &htcsable_kbd, @@ -128,8 +140,12 @@ #ifdef CONFIG_HTCSABLE_BACKLIGHT &htcsable_bl, #endif +#ifdef CONFIG_HTCSABLE_BT &htcsable_bt, +#endif +#ifdef CONFIG_HTCSABLE_PHONE &htcsable_phone, +#endif &htcsable_udc, }; @@ -231,15 +247,20 @@ &htcsable_core, }; +#ifdef CONFIG_HTCSABLE_BT static struct platform_pxa_serial_funcs htcsable_pxa_bt_funcs = { .configure = htcsable_bt_configure, }; +#endif + +#ifdef CONFIG_HTCSABLE_PHONE static struct platform_pxa_serial_funcs htcsable_pxa_phone_funcs = { .configure = htcsable_phone_configure, #if 0 .ioctl = htcsable_phone_ioctl, #endif }; +#endif static void __init htcsable_map_io(void) { @@ -248,8 +269,12 @@ pxa_map_io(); /* Is this correct? If yes, please add comment, that vendor was drunk when did soldering. */ +#ifdef CONFIG_HTCSABLE_BT pxa_set_ffuart_info(&htcsable_pxa_bt_funcs); +#endif +#ifdef CONFIG_HTCSABLE_PHONE pxa_set_btuart_info(&htcsable_pxa_phone_funcs); +#endif // sport = platform_get_drvdata(&ffuart device); // printk("sport=0x%x\n", (unsigned int)sport); @@ -272,6 +297,18 @@ platform_add_devices( devices, ARRAY_SIZE(devices) ); } +#ifdef CONFIG_MACH_HTCBEETLES +MACHINE_START(HTCBEETLES, "HTC Beetles") + .phys_io = 0x40000000, + .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, + .boot_params = 0xa0000100, + .map_io = htcsable_map_io, + .init_irq = pxa_init_irq, + .timer = &pxa_timer, + .init_machine = htcsable_init, +MACHINE_END +#endif +#ifdef CONFIG_MACH_HW6900 MACHINE_START(HW6900, "HTC Sable") .phys_io = 0x40000000, .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, @@ -281,4 +318,4 @@ .timer = &pxa_timer, .init_machine = htcsable_init, MACHINE_END - +#endif Index: arch/arm/mach-pxa/htcsable/Makefile =================================================================== --- arch/arm/mach-pxa/htcsable/Makefile (revision 1250) +++ arch/arm/mach-pxa/htcsable/Makefile (working copy) @@ -1,16 +1,17 @@ # # Makefile for HTC Sable # -obj-$(CONFIG_MACH_HW6900) += htcsable.o htcsable_udc.o \ +obj-$(CONFIG_MACH_HTCBEETLES) += htcsable.o htcsable_udc.o \ htcsable_ts2.o \ htcsable_pm.o \ htcsable_core.o \ htcsable_keyboard.o \ htcsable_buttons.o \ - htcsable_kbd.o \ - htcsable_bt.o htcsable_phone.o \ - htcsable_rom.o + htcsable_kbd.o -obj-$(CONFIG_HTCSABLE_LCD) += htcsable_lcd.o -obj-$(CONFIG_HTCSABLE_BACKLIGHT) += htcsable_bl.o +obj-$(CONFIG_HTCSABLE_BT) += htcsable_bt.o +obj-$(CONFIG_HTCSABLE_PHONE) += htcsable_phone.o +obj-$(CONFIG_HTCSABLE_ROM) += htcsable_rom.o +obj-$(CONFIG_HTCSABLE_LCD) += htcsable_lcd.o +obj-$(CONFIG_HTCSABLE_BACKLIGHT) += htcsable_bl.o Index: arch/arm/mach-pxa/Makefile =================================================================== --- arch/arm/mach-pxa/Makefile (revision 1250) +++ arch/arm/mach-pxa/Makefile (working copy) @@ -36,6 +36,7 @@ obj-$(CONFIG_MACH_MAGICIAN) += magician/ obj-$(CONFIG_MACH_HTCAPACHE) += htcapache/ obj-$(CONFIG_MACH_BLUEANGEL) += htcblueangel/ +obj-$(CONFIG_MACH_HTCBEETLES) += htcsable/ obj-$(CONFIG_MACH_HTCATHENA) += htcathena/ obj-$(CONFIG_MACH_HW6900) += htcsable/ obj-$(CONFIG_ARCH_ROVERP1) += rover/