PalmTT
Subsystems (4)
Hi,
I´ve pulled latest git snapshot and it seems palmtt is there (all four patches - board, defconfig, lcd, leds), but as Tony wrote I had to fix those tabs (formating) before it´ll be (maybe ;-)) merged. I havent seen any mention about merging TT on gitweb so I was just curious why is it there :)
Well ... doesnt matter ... here´s a patch that fixes formating in board-palmtt.c and lcd-palmtt.c (formating - tabs and removing commented code). I´ve also made a small change to board-palmz71.c formating.
Plus I changed GPIO 6 name in board-palmz71(tt).h (renamed PALMxxx_PINTDAV_GPIO to PALMxxx_PENIRQ_GPIO, where xxx=TT or Z71). Hope it doesnt matter I put it into one patch while it´s a small (one line - see the bottom of the patch) change.
Patch is enclosed.
BR
Marek
arch/arm/mach-omap1/board-palmtt.c +100 -131
@@ -63,40 +63,40 @@static struct mtd_partition palmtt_partitions[] = { { - .name ="write8k" , - .offset =0 , - .size =SZ_8K , - .mask_flags =0 , + .name ="write8k" , + .offset =0 , + .size =SZ_8K , + .mask_flags =0 , }, { - .name ="PalmOS-BootLoader(ro)" , - .offset =SZ_8K , - .size =7 *SZ_8K , - .mask_flags =MTD_WRITEABLE , + .name ="PalmOS-BootLoader(ro)" , + .offset =SZ_8K , + .size =7 *SZ_8K , + .mask_flags =MTD_WRITEABLE , }, { - .name ="u-boot" , - .offset =MTDPART_OFS_APPEND , - .size =8 *SZ_8K , - .mask_flags =0 , + .name ="u-boot" , + .offset =MTDPART_OFS_APPEND , + .size =8 *SZ_8K , + .mask_flags =0 , }, { - .name ="PalmOS-FS(ro)" , - .offset =MTDPART_OFS_APPEND , - .size =7 *SZ_1M +4 *SZ_64K -16 *SZ_8K , - .mask_flags =MTD_WRITEABLE , + .name ="PalmOS-FS(ro)" , + .offset =MTDPART_OFS_APPEND , + .size =7 *SZ_1M +4 *SZ_64K -16 *SZ_8K , + .mask_flags =MTD_WRITEABLE , }, { - .name ="u-boot(rez)" , - .offset =MTDPART_OFS_APPEND , - .size =SZ_128K , - .mask_flags =0 + .name ="u-boot(rez)" , + .offset =MTDPART_OFS_APPEND , + .size =SZ_128K , + .mask_flags =0 }, { - .name ="empty" , - .offset =MTDPART_OFS_APPEND , - .size =MTDPART_SIZ_FULL , - .mask_flags =0 + .name ="empty" , + .offset =MTDPART_OFS_APPEND , + .size =MTDPART_SIZ_FULL , + .mask_flags =0 } };
@@ -126,18 +126,20 @@#define DEFAULT_BITPERSAMPLE 16static struct omap_mcbsp_reg_cfg mcbsp_regs = { - .spcr2 =FREE |FRST |GRST |XRST |XINTM (3 ), - .spcr1 =RINTM (3 ) |RRST , - .rcr2 =RPHASE |RFRLEN2 (OMAP_MCBSP_WORD_8 ) | -RWDLEN2 (OMAP_MCBSP_WORD_16 ) |RDATDLY (0 ), - .rcr1 =RFRLEN1 (OMAP_MCBSP_WORD_8 ) |RWDLEN1 (OMAP_MCBSP_WORD_16 ), - .xcr2 =XPHASE |XFRLEN2 (OMAP_MCBSP_WORD_8 ) | -XWDLEN2 (OMAP_MCBSP_WORD_16 ) |XDATDLY (0 ) |XFIG , - .xcr1 =XFRLEN1 (OMAP_MCBSP_WORD_8 ) |XWDLEN1 (OMAP_MCBSP_WORD_16 ), - .srgr1 =FWID (DEFAULT_BITPERSAMPLE -1 ), - .srgr2 =GSYNC |CLKSP |FSGM |FPER (DEFAULT_BITPERSAMPLE *2 -1 ), -/*.pcr0 = FSXM | FSRM | CLKXM | CLKRM | CLKXP | CLKRP,*/ /* mcbsp: master */ - .pcr0 =CLKXP |CLKRP ,/* mcbsp: slave */ + .spcr2 =FREE |FRST |GRST |XRST |XINTM (3 ), + .spcr1 =RINTM (3 ) |RRST , + .rcr2 =RPHASE |RFRLEN2 (OMAP_MCBSP_WORD_8 ) | +RWDLEN2 (OMAP_MCBSP_WORD_16 ) |RDATDLY (0 ), + .rcr1 =RFRLEN1 (OMAP_MCBSP_WORD_8 ) | +RWDLEN1 (OMAP_MCBSP_WORD_16 ), + .xcr2 =XPHASE |XFRLEN2 (OMAP_MCBSP_WORD_8 ) | +XWDLEN2 (OMAP_MCBSP_WORD_16 ) |XDATDLY (0 ) |XFIG , + .xcr1 =XFRLEN1 (OMAP_MCBSP_WORD_8 ) | +XWDLEN1 (OMAP_MCBSP_WORD_16 ), + .srgr1 =FWID (DEFAULT_BITPERSAMPLE -1 ), + .srgr2 =GSYNC |CLKSP |FSGM | +FPER (DEFAULT_BITPERSAMPLE *2 -1 ), + .pcr0 =CLKXP |CLKRP ,/* mcbsp: slave */ };static struct omap_alsa_codec_config alsa_config = {
@@ -153,8 +155,8 @@static struct platform_device palmtt_mcbsp1_device = { .name ="omap_alsa_mcbsp" , - .id =1 , - .dev = { + .id =1 , + .dev = { .platform_data = &alsa_config, }, };
@@ -188,69 +190,69 @@ .id = -1, };static struct omap_irda_config palmtt_irda_config = { - .transceiver_cap =IR_SIRMODE , - .rx_channel =OMAP_DMA_UART3_RX , - .tx_channel =OMAP_DMA_UART3_TX , - .dest_start =UART3_THR , - .src_start =UART3_RHR , - .tx_trigger =0 , - .rx_trigger =0 , + .transceiver_cap =IR_SIRMODE , + .rx_channel =OMAP_DMA_UART3_RX , + .tx_channel =OMAP_DMA_UART3_TX , + .dest_start =UART3_THR , + .src_start =UART3_RHR , + .tx_trigger =0 , + .rx_trigger =0 , };static struct resource palmtt_irda_resources[] = { - [0 ] = { - .start =INT_UART3 , - .end =INT_UART3 , - .flags =IORESOURCE_IRQ , - }, + [0 ] = { + .start =INT_UART3 , + .end =INT_UART3 , + .flags =IORESOURCE_IRQ , + }, };static struct platform_device palmtt_irda_device = { - .name ="omapirda" , - .id =-1 , - .dev = { - .platform_data = &palmtt_irda_config, - }, - .num_resources =ARRAY_SIZE (palmtt_irda_resources), - .resource = palmtt_irda_resources, + .name ="omapirda" , + .id =-1 , + .dev = { + .platform_data = &palmtt_irda_config, + }, + .num_resources =ARRAY_SIZE (palmtt_irda_resources), + .resource = palmtt_irda_resources, };static struct platform_device palmtt_spi_device = { - .name ="spi_palmtt" , - .id =-1 , + .name ="spi_palmtt" , + .id =-1 , };static struct omap_backlight_config palmtt_backlight_config = { - .default_intensity =0xa0 , + .default_intensity =0xa0 , };static struct platform_device palmtt_backlight_device = { - .name ="omap-bl" , - .id =-1 , - .dev = { - .platform_data = &palmtt_backlight_config, - }, + .name ="omap-bl" , + .id =-1 , + .dev = { + .platform_data = &palmtt_backlight_config, + }, };static struct omap_led_config palmtt_led_config[] = { - { - .cdev = { - .name ="palmtt:led0" , + { + .cdev = { + .name ="palmtt:led0" , }, - .gpio =PALMTT_LED_GPIO , + .gpio =PALMTT_LED_GPIO , }, };static struct omap_led_platform_data palmtt_led_data = { - .nr_leds =ARRAY_SIZE (palmtt_led_config), - .leds = palmtt_led_config, + .nr_leds =ARRAY_SIZE (palmtt_led_config), + .leds = palmtt_led_config, };static struct platform_device palmtt_led_device = { - .name ="omap-led" , - .id =-1 , - .dev = { - .platform_data = &palmtt_led_data, + .name ="omap-led" , + .id =-1 , + .dev = { + .platform_data = &palmtt_led_data, }, };
@@ -262,34 +264,34 @@ &palmtt_irda_device, &palmtt_spi_device, &palmtt_backlight_device, - &palmtt_led_device, + &palmtt_led_device, };static int palmtt_get_pendown_state (void ) { -return !omap_get_gpio_datain (6 ); +return !omap_get_gpio_datain (PALMTT_PENIRQ_GPIO ); }static const struct ads7846_platform_data palmtt_ts_info = { - .model =7846 , - .vref_delay_usecs =100 ,/* internal, no capacitor */ - .x_plate_ohms =419 , - .y_plate_ohms =486 , - .get_pendown_state = palmtt_get_pendown_state, -}; - -static struct spi_board_info __initdata palmtt_boardinfo[] = { { -/* MicroWire (bus 2) CS0 has an ads7846e */ - .modalias ="ads7846" , - .platform_data = &palmtt_ts_info, - .irq =OMAP_GPIO_IRQ (6 ), - .max_speed_hz =120000 /* max sample rate at 3V */ - *26 /* command + data + overhead */ , - .bus_num =2 , - .chip_select =0 , -} }; - -//static int __initdata palmtt_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1}; + .model =7846 , + .vref_delay_usecs =100 ,/* internal, no capacitor */ + .x_plate_ohms =419 , + .y_plate_ohms =486 , + .get_pendown_state = palmtt_get_pendown_state, +}; + +static struct spi_board_info __initdata palmtt_boardinfo[] = { + { +/* MicroWire (bus 2) CS0 has an ads7846e */ + .modalias ="ads7846" , + .platform_data = &palmtt_ts_info, + .irq =OMAP_GPIO_IRQ (PALMTT_PENIRQ_GPIO ), + .max_speed_hz =120000 /* max sample rate at 3V */ + *26 /* command + data + overhead */ , + .bus_num =2 , + .chip_select =0 , + } +};static void __init omap_palmtt_init_irq (void ) {
@@ -308,7 +310,7 @@ };static struct omap_uart_config palmtt_uart_config__initdata = { - .enabled_uarts = (1 <<0 ) | (1 <<1 ) | (0 <<2 ), + .enabled_uarts = (1 <<0 ) | (1 <<1 ) | (0 <<2 ), };static struct omap_board_config_kernel palmtt_config[] = {
@@ -316,19 +318,6 @@ { OMAP_TAG_LCD, &palmtt_lcd_config }, { OMAP_TAG_UART, &palmtt_uart_config }, }; -/*should be fixed soon*/ -/*static irqreturn_t -palmtt_powercable(int irq, void *dev_id, struct pt_regs *regs) -{ -if (omap_get_gpio_datain(PALMTT_USBDETECT_GPIO)) { -printk(KERN_INFO "PM: USB cable connected (charging)\n"); -set_irq_type(OMAP_GPIO_IRQ(PALMTT_USBDETECT_GPIO), IRQT_FALLING); -} else { -printk(KERN_INFO "PM: USB cable disconnected\n"); -set_irq_type(OMAP_GPIO_IRQ(PALMTT_USBDETECT_GPIO), IRQT_RISING); -} -return IRQ_HANDLED; -}*/ static void __init omap_mpu_wdt_mode (int mode) {if (mode)
@@ -338,28 +327,9 @@omap_writew (0x00a0 ,OMAP_WDT_TIMER_MODE ); } } -/*needs to be fixed, this will be simple*/ -/*static void __init palmtt_gpio_setup(int early) -{ -if (early) { -omap_set_gpio_dataout(1,1); -omap_set_gpio_direction(1,0); -} else { -if (omap_request_gpio(PALMTT_USBDETECT_GPIO)) { -printk(KERN_ERR "Could not reserve cable signal GPIO!\n"); -return; -} -omap_set_gpio_direction(PALMTT_USBDETECT_GPIO, 1); -if (request_irq(OMAP_GPIO_IRQ(PALMTT_USBDETECT_GPIO), palmtt_powercable, -SA_SAMPLE_RANDOM, "palmtt-cable", 0)) -printk(KERN_ERR "IRQ request for power cable failed!\n"); -palmtt_powercable(OMAP_GPIO_IRQ(PALMTT_USBDETECT_GPIO), 0, 0); -} -}*/ static void __init omap_palmtt_init (void ) { -// palmtt_gpio_setup(1); omap_mpu_wdt_mode (0 ); omap_board_config = palmtt_config;
@@ -369,7 +339,6 @@spi_register_board_info (palmtt_boardinfo,ARRAY_SIZE (palmtt_boardinfo));omap_serial_init (); -// palmtt_gpio_setup(0); }static void __init omap_palmtt_map_io (void )
@@ -377,7 +346,7 @@omap1_map_common_io (); } -MACHINE_START (OMAP_PALMTT ,"PalmTT" ) +MACHINE_START (OMAP_PALMTT ,"OMAP1510 based Palm Tungsten|T" ) .phys_io = 0xfff00000, .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc, .boot_params = 0x10000100,
arch/arm/mach-omap1/board-palmz71.c +25 -26
86 lines not on this page · raw message
drivers/video/omap/lcd_palmtt.c +22 -21
52 lines not on this page · raw message
drivers/video/omap/lcd_palmz71.c +0 -2
@@ -30,8 +30,6 @@#include <asm/arch/gpio.h> #include <asm/arch/omapfb.h> -/* #define OMAPFB_DBG 1 */ -static int palmz71_panel_init (struct omapfb_device *panel) {return 0 ;
include/asm-arm/arch-omap/board-palmtt.h +2 -2
@@ -16,8 +16,8 @@#define PALMTT_USBDETECT_GPIO 0#define PALMTT_CABLE_GPIO 1#define PALMTT_LED_GPIO 3 -#define PALMTT_PINTDAV_GPIO 6 +#define PALMTT_PENIRQ_GPIO 6#define PALMTT_MMC_WP_GPIO 8 -#define PALMTT_HDQ_GPIO 11 +#define PALMTT_HDQ_GPIO 11#endif /* __OMAP_BOARD_PALMTT_H */
include/asm-arm/arch-omap/board-palmz71.h +1 -1
@@ -14,7 +14,7 @@#define __OMAP_BOARD_PALMZ71_H#define PALMZ71_USBDETECT_GPIO 0 -#define PALMZ71_PINTDAV_GPIO 6 +#define PALMZ71_PENIRQ_GPIO 6#define PALMZ71_MMC_WP_GPIO 8#define PALMZ71_HDQ_GPIO 11
Tony Lindgren
reviewerHi,
Quoted 5 lines · Marek Vašut
Hi,
I´ve pulled latest git snapshot and it seems palmtt is there (all four patches - board, defconfig, lcd, leds), but as Tony wrote I had to fix those tabs (formating) before it´ll be (maybe ;-)) merged. I havent seen any mention about merging TT on gitweb so I was just curious why is it there :)
Oops, sorry. Looks like I pushed them accidentally in Kyungmin's USB patch.
Quoted 3 lines
Well ... doesnt matter ... here´s a patch that fixes formating in
board-palmtt.candlcd-palmtt.c(formating - tabs and removing commented code). I´ve also made a small change toboard-palmz71.cformating.
Well I just reverted the patch, and reapplied Kyungmin's patch without your code :)
The reason is that we want to be able to send the patches upstream as they are without editing them again. And reverting a patch and reapplying the modified patch makes sending patches upstream easy, as we can just ignore the reverted patches.
Can you please repost your series one more time with the formatting changes?
Quoted 4 lines
Plus I changed GPIO 6 name in board-palmz71(tt).h (renamed
PALMxxx_PINTDAV_GPIOtoPALMxxx_PENIRQ_GPIO, where xxx=TT or Z71). Hope it doesnt matter I put it into one patch while it´s a small (one line - see the bottom of the patch) change.
OK
Regards,
Tony