PalmTX initial support
Subsystems (3)
PATCH 1/1 PalmTX initial support
Hi,
the following patch adds initial support for PalmTX handheld computer. It originates from HnD kernel tree (www.hackndev.com), then I pushed it to handhelds.org and now I'd like it to be applied mainline.
PalmTX is pxa27x based handheld computer.
Currently supported - mmc, gpio keys, pxa matrix keypad, irda, framebuffer, ac97 port (for touchscreen).
best regards
Marek Vasut
arch/arm/mach-pxa/Kconfig +13 -0
@@ -138,6 +138,19 @@ config MACH_PCM027 select PXA27x select IWMMXT +config ARCH_PXA_PALM + bool "PXA based Palm PDAs" + +config MACH_XSCALE_PALMTX + bool "Palm T|X" + default y + depends on ARCH_PXA_PALM + select PXA27x + select IWMMXT + help + Say Y here if you intend to run this kernel on a Palm T|X + handheld computer. + endchoice choice
arch/arm/mach-pxa/Makefile +1 -0
@@ -36,6 +36,7 @@ obj-$(CONFIG_MACH_TOSA) += tosa.o obj-$(CONFIG_MACH_EM_X270) += em-x270.o obj-$(CONFIG_MACH_MAGICIAN) += magician.o obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o +obj-$(CONFIG_MACH_XSCALE_PALMTX)+= palmtx.o ifeq ($(CONFIG_MACH_ZYLONITE),y) obj-y += zylonite.o
arch/arm/mach-pxa/palmtx.c new file +299 -0
299 lines not on this page · raw message
include/asm-arm/arch-pxa/palmtx-gpio.h new file +73 -0
73 lines not on this page · raw message
include/asm-arm/arch-pxa/palmtx-init.h new file +69 -0
69 lines not on this page · raw message
Quoted 100 lines · Marek Va??ut
Hi,
the following patch adds initial support for PalmTX handheld computer. It originates from HnD kernel tree (www.hackndev.com), then I pushed it to handhelds.org and now I'd like it to be applied mainline.PalmTX is pxa27x based handheld computer.
Currently supported - mmc, gpio keys, pxa matrix keypad, irda, framebuffer, ac97 port (for touchscreen).
Signed-off-by Marek Vasut <[email protected]>best regards
Marek VasutSigned-off-by Marek Vasut <[email protected]>arch/arm/mach-pxa/Kconfig +13
-0@@ -138,6 +138,19 @@ config MACH_PCM027 select PXA27x select IWMMXT +config ARCH_PXA_PALM + bool "PXA based Palm PDAs" + +config MACH_XSCALE_PALMTX + bool "Palm T|X" + default y + depends on ARCH_PXA_PALM + select PXA27x + select IWMMXT + help + Say Y here if you intend to run this kernel on a Palm T|X + handheld computer. + endchoice choicearch/arm/mach-pxa/Makefile +1
-0@@ -36,6 +36,7 @@ obj-$(CONFIG_MACH_TOSA) += tosa.o obj-$(CONFIG_MACH_EM_X270) += em-x270.o obj-$(CONFIG_MACH_MAGICIAN) += magician.o obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o +obj-$(CONFIG_MACH_XSCALE_PALMTX)+= palmtx.o ifeq ($(CONFIG_MACH_ZYLONITE),y) obj-y += zylonite.oarch/arm/mach-pxa/palmtx.c new file +42
-0@@ -0,0 +1,299 @@ +/* +* Hardware definitions for PalmTX +* +* Authors: Marek Vasut <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* (find more info at www.hackndev.com) +* +*/ + +#include <linux/platform_device.h> +#include <linux/delay.h> +#include <linux/irq.h> +#include <linux/gpio_keys.h> +#include <linux/input.h> + +#include <asm/mach-types.h> +#include <asm/mach/arch.h> +#include <asm/mach/map.h> + +#include <asm/arch/palmtx-init.h> +#include <asm/arch/palmtx-gpio.h> +#include <asm/arch/mmc.h> +#include <asm/arch/pxafb.h> +#include <asm/arch/pxa-regs.h> +#include <asm/arch/gpio.h> +#include <asm/arch/pxa2xx-gpio.h> +#include <asm/arch/irda.h> +#include <asm/arch/pxa27x_keypad.h> + +#include "generic.h" + +/****************************************************************************** +* SD/MMC card controller +******************************************************************************/ +static int palmtx_mci_init (struct device *dev, +irqreturn_t (*palmtx_detect_int)(int ,void *), +void *data) +{
arch/arm/mach-pxa/palmtx.c line 52
Quoted 10 lines
arch/arm/mach-pxa/palmtx.c new file +10
-0+int err =0 ; + +/* Setup GPIOs for MMC/SD card controller. */ +pxa_gpio_mode (GPIO32_MMCCLK_MD ); +pxa_gpio_mode (GPIO92_MMCDAT0_MD ); +pxa_gpio_mode (GPIO109_MMCDAT1_MD ); +pxa_gpio_mode (GPIO110_MMCDAT2_MD ); +pxa_gpio_mode (GPIO111_MMCDAT3_MD ); +pxa_gpio_mode (GPIO112_MMCCMD_MD ); +pxa_gpio_mode (GPIO_NR_PALMTX_SD_DETECT_N |GPIO_IN );
I belive these calls are being deprecated.
arch/arm/mach-pxa/palmtx.c line 55
Quoted 2 lines
arch/arm/mach-pxa/palmtx.c new file +2
-0+/* Setup an interrupt for detecting card insert/remove events */ +set_irq_type (IRQ_GPIO_PALMTX_SD_DETECT_N ,IRQ_TYPE_EDGE_BOTH );
don't call set_irq_type, pass the relevant trigger flags to request_irq().
arch/arm/mach-pxa/palmtx.c line 67
Quoted 12 lines
arch/arm/mach-pxa/palmtx.c new file +12
-0+ err =request_irq (IRQ_GPIO_PALMTX_SD_DETECT_N , palmtx_detect_int, +IRQF_DISABLED |IRQF_SAMPLE_RANDOM , +"SD/MMC card detect" , data); +if (err) { +printk (KERN_ERR "%s: cannot request SD/MMC card detect IRQ\n" , + __func__); +return err; + } + +printk (KERN_DEBUG "%s: irq registered\n" , __func__); + +return 0 ;
hmm, why isn't the pxa sdmmc driver doing something about the detection for the cards?
arch/arm/mach-pxa/palmtx.c line 78
Quoted 10 lines
arch/arm/mach-pxa/palmtx.c new file +10
-0+ +static void palmtx_mci_exit (struct device *dev,void *data) +{ +free_irq (IRQ_GPIO_PALMTX_SD_DETECT_N , data); +} + +static void palmtx_mci_power (struct device *dev,unsigned int vdd) +{ +struct pxamci_platform_data *p_d = dev->platform_data; +gpio_set_value (GPIO_NR_PALMTX_SD_POWER , !!((1 << vdd) & p_d->ocr_mask));
hmm, that looks like an evil second argument.
Quoted 41 lines
arch/arm/mach-pxa/palmtx.c new file +41
-0+} + +static int palmtx_mci_get_ro (struct device *dev) +{ +return gpio_get_value (GPIO_NR_PALMTX_SD_READONLY ); +} + +static struct pxamci_platform_data palmtx_mci_platform_data = { + .ocr_mask =MMC_VDD_32_33 |MMC_VDD_33_34 , + .setpower = palmtx_mci_power, + .get_ro = palmtx_mci_get_ro, + .init = palmtx_mci_init, + .exit = palmtx_mci_exit, +}; + +/****************************************************************************** +* GPIO keyboard +******************************************************************************/ +static unsigned int palmtx_matrix_keys[] = { +KEY (0 ,0 ,KEY_POWER ), +KEY (0 ,1 ,KEY_F1 ), +KEY (0 ,2 ,KEY_ENTER ), + +KEY (1 ,0 ,KEY_F2 ), +KEY (1 ,1 ,KEY_F3 ), +KEY (1 ,2 ,KEY_F4 ), + +KEY (2 ,0 ,KEY_UP ), +KEY (2 ,2 ,KEY_DOWN ), + +KEY (3 ,0 ,KEY_RIGHT ), +KEY (3 ,2 ,KEY_LEFT ), + +}; + +static struct pxa27x_keypad_platform_data palmtx_keypad_platform_data = { + .matrix_key_rows =4 , + .matrix_key_cols =3 , + .matrix_key_map = palmtx_matrix_keys, + .matrix_key_map_size =ARRAY_SIZE (palmtx_matrix_keys), +
arch/arm/mach-pxa/palmtx.c line 129
Quoted 10 lines
arch/arm/mach-pxa/palmtx.c new file +10
-0+ .debounce_interval = 30, +}; + +/****************************************************************************** +* GPIO keys +******************************************************************************/ +#ifdef CONFIG_KEYBOARD_GPIO +static struct gpio_keys_button palmtx_pxa_buttons[] = { + {KEY_F8 ,GPIO_NR_PALMTX_HOTSYNC_BUTTON_N ,1 ,"HotSync Button" }, +};
I've never seen the pooint of #ifdefs for platform data, just bung the lot in, it is always possible to build and an insert a new driver module to support this after building the zImage.
Quoted 23 lines
arch/arm/mach-pxa/palmtx.c new file +23
-0+static struct gpio_keys_platform_data palmtx_pxa_keys_data = { + .buttons = palmtx_pxa_buttons, + .nbuttons =ARRAY_SIZE (palmtx_pxa_buttons), +}; + +static struct platform_device palmtx_pxa_keys = { + .name ="gpio-keys" , + .dev = { + .platform_data = &palmtx_pxa_keys_data, + }, +}; +#endif + +/****************************************************************************** +* Backlight +******************************************************************************/ +static void palmtx_set_bl_intensity (int intensity) +{ +gpio_set_value (GPIO_NR_PALMTX_BL_POWER , intensity); +gpio_set_value (GPIO_NR_PALMTX_LCD_POWER , intensity); +if (intensity) { +PWM_CTRL0 =0x7 ; +PWM_PERVAL0 =PALMTX_PERIOD ;
arch/arm/mach-pxa/palmtx.c line 163
Quoted 10 lines
arch/arm/mach-pxa/palmtx.c new file +10
-0+PWM_PWDUTY0 = intensity; + } +} + +static struct generic_bl_info palmtx_bl_info = { + .max_intensity =PALMTX_MAX_INTENSITY , + .default_intensity =PALMTX_MAX_INTENSITY , + .set_bl_intensity = palmtx_set_bl_intensity, + .limit_mask =PALMTX_LIMIT_MASK , +};
go and have a look at the new pwm stuff.
Quoted 141 lines
arch/arm/mach-pxa/palmtx.c new file +135
-0+static struct platform_device palmtx_backlight = { + .name ="generic-bl" , + .id =-1 , + .dev = { + .platform_data = &palmtx_bl_info, + }, +}; + +/****************************************************************************** +* IrDA +******************************************************************************/ +static void palmtx_irda_transceiver_mode (struct device *dev,int mode) +{ +unsigned long flags; + +local_irq_save (flags); + +if (mode &IR_SIRMODE ) +printk (KERN_INFO "IrDA: setting mode to SIR\n" ); +else if (mode &IR_FIRMODE ) +printk (KERN_INFO "IrDA: setting mode to FIR\n" ); + +if (mode &IR_OFF ) { +printk (KERN_INFO "IrDA: turning transceiver OFF\n" ); +gpio_set_value (GPIO_NR_PALMTX_IR_DISABLE ,1 ); + }else { +printk (KERN_INFO "IrDA: turning transceiver ON\n" ); +gpio_set_value (GPIO_NR_PALMTX_IR_DISABLE ,0 ); +gpio_set_value (GPIO47_ICPTXD_MD ,1 ); +mdelay (30 ); +gpio_set_value (GPIO47_ICPTXD_MD ,0 ); + } + +local_irq_restore (flags); +} + +static struct pxaficp_platform_data palmtx_ficp_platform_data = { + .transceiver_cap =IR_SIRMODE |IR_FIRMODE |IR_OFF , + .transceiver_mode = palmtx_irda_transceiver_mode, +}; + +/****************************************************************************** +* AC97 +******************************************************************************/ +static struct platform_device palmtx_ac97 = { + .name ="pxa2xx-ac97" , + .id =0 , +}; + +/****************************************************************************** +* Framebuffer +******************************************************************************/ +static struct pxafb_mode_info palmtx_lcd_modes[] = { +{ + .pixclock =57692 , + .xres =320 , + .yres =480 , + .bpp =16 , + + .left_margin =32 , + .right_margin =1 , + .upper_margin =7 , + .lower_margin =1 , + + .hsync_len =4 , + .vsync_len =1 , + + .sync =FB_SYNC_HOR_HIGH_ACT |FB_SYNC_VERT_HIGH_ACT , +}, +}; + +static struct pxafb_mach_info palmtx_lcd_screen = { + .modes = palmtx_lcd_modes, + .num_modes =ARRAY_SIZE (palmtx_lcd_modes), + .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act |LCCR0_RDSTM | +LCCR0_CMDIM |LCCR0_OUC |LCCR0_LDDALT , + .lccr3 = LCCR3_HorSnchL | LCCR3_VrtSnchL | + LCCR3_PixFlEdg |LCCR3_Bpp (4 ), +}; + +/****************************************************************************** +* Machine init +******************************************************************************/ +static struct platform_device *devices[]__initdata = { +#ifdef CONFIG_KEYBOARD_GPIO + &palmtx_pxa_keys, +#endif + &palmtx_ac97, + &palmtx_backlight, +}; + +static struct map_desc palmtx_io_desc[]__initdata = { +{ + .virtual =PALMTX_PCMCIA_VIRT , + .pfn =__phys_to_pfn (PALMTX_PCMCIA_PHYS ), + .length =PALMTX_PCMCIA_SIZE , + .type =MT_DEVICE +}, +}; + +static void __init palmtx_map_io (void ) +{ +pxa_map_io (); +iotable_init (palmtx_io_desc,ARRAY_SIZE (palmtx_io_desc)); +} + +static void __init palmtx_init (void ) +{ +/* disable primary codec interrupt to prevent WM9712 constantly +* interrupting the CPU and preventing the boot process to complete +* (Thanx Alex & Shadowmite!) */ +GCR &= ~GCR_PRIRDY_IEN ; + +/* configure AC97's GPIOs */ +pxa_gpio_mode (GPIO28_BITCLK_AC97_MD ); +pxa_gpio_mode (GPIO29_SDATA_IN_AC97_MD ); +pxa_gpio_mode (GPIO30_SDATA_OUT_AC97_MD ); +pxa_gpio_mode (GPIO31_SYNC_AC97_MD ); + +set_pxa_fb_info (&palmtx_lcd_screen); +pxa_set_mci_info (&palmtx_mci_platform_data); +pxa_set_ficp_info (&palmtx_ficp_platform_data); +pxa_set_keypad_info (&palmtx_keypad_platform_data); +platform_add_devices (devices,ARRAY_SIZE (devices)); +} + +MACHINE_START (XSCALE_PALMTX ,"Palm T|X" ) + .phys_io = PALMTX_PHYS_IO_START, + .io_pg_offst = io_p2v(0x40000000), + .boot_params = 0xa0000100, + .map_io = palmtx_map_io, + .init_irq = pxa27x_init_irq, + .timer = &pxa_timer, + .init_machine = palmtx_init +MACHINE_END include/asm-arm/arch-pxa/palmtx-gpio.h new file +0
-0
include/asm-arm/arch-pxa/palmtx-gpio.h line 8
Quoted 8 lines
include/asm-arm/arch-pxa/palmtx-gpio.h new file +8
-0@@ -0,0 +1,73 @@ +/* +* GPIOs and interrupts for Palm T|X Handheld Computer +* +* Based on palmld-gpio.h by Alex Osborne +* +* Authors: Marek Vasut <[email protected]> +* Cristiano P. <cristianop AT users DOT sourceforge DOT net> +* Jan Herman <2hp AT seznam DOT cz>
hmm, real email addresses are generally safe here.
Quoted 54 lines
include/asm-arm/arch-pxa/palmtx-gpio.h new file +54
-0+* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +*/ + +#ifndef _INCLUDE_PALMTX_GPIO_H_ +#define _INCLUDE_PALMTX_GPIO_H_ + +/* GPIOs */ +#define GPIO_NR_PALMTX_GPIO_RESET 1 + +#define GPIO_NR_PALMTX_POWER_DETECT 12/* 90 */ +#define GPIO_NR_PALMTX_HOTSYNC_BUTTON_N 10 +#define GPIO_NR_PALMTX_EARPHONE_DETECT 107 + +/* SD/MMC */ +#define GPIO_NR_PALMTX_SD_DETECT_N 14 +#define GPIO_NR_PALMTX_SD_POWER 114/* probably */ +#define GPIO_NR_PALMTX_SD_READONLY 115/* probably */ + +/* TOUCHSCREEN */ +#define GPIO_NR_PALMTX_WM9712_IRQ 27 + +/* IRDA - disable GPIO connected to SD pin of tranceiver (TFBS4710?) ? */ +#define GPIO_NR_PALMTX_IR_DISABLE 40 + +/* USB */ +#define GPIO_NR_PALMTX_USB_DETECT_N 13 +#define GPIO_NR_PALMTX_USB_POWER 95 +#define GPIO_NR_PALMTX_USB_PULLUP 93 + +/* LCD/BACKLIGHT */ +#define GPIO_NR_PALMTX_SCREEN 19 +#define GPIO_NR_PALMTX_BL_POWER 84 +#define GPIO_NR_PALMTX_LCD_POWER 96 + +/* LCD BORDER */ +#define GPIO_NR_PALMTX_BORDER_SWITCH 98 +#define GPIO_NR_PALMTX_BORDER_SELECT 22 + +/* BLUETOOTH */ +#define GPIO_NR_PALMTX_BT_POWER 17 +#define GPIO_NR_PALMTX_BT_RESET 83 + +/* PCMCIA (WiFi) */ +#define GPIO_NR_PALMTX_PCMCIA_POWER1 94 +#define GPIO_NR_PALMTX_PCMCIA_POWER2 108 +#define GPIO_NR_PALMTX_PCMCIA_RESET 79 +#define GPIO_NR_PALMTX_PCMCIA_READY 116 + +/* NAND Flash ... these GPIOs are maybe incorrect! */ +#define GPIO_NR_PALMTX_NAND_CS1_N 15 +#define GPIO_NR_PALMTX_NAND_READY 18
include/asm-arm/arch-pxa/palmtx-gpio.h line 73
Quoted 10 lines
include/asm-arm/arch-pxa/palmtx-gpio.h new file +10
-0+#define GPIO_NR_PALMTX_NAND_WE_N 49 +#define GPIO_NR_PALMTX_NAND_BUFFER_DIR 79 + +/* INTERRUPTS */ +#define IRQ_GPIO_PALMTX_SD_DETECT_N IRQ_GPIO(GPIO_NR_PALMTX_SD_DETECT_N) +#define IRQ_GPIO_PALMTX_WM9712_IRQ IRQ_GPIO(GPIO_NR_PALMTX_WM9712_IRQ) +#define IRQ_GPIO_PALMTX_USB_DETECT IRQ_GPIO(GPIO_NR_PALMTX_USB_DETECT) +#define IRQ_GPIO_PALMTX_GPIO_RESET IRQ_GPIO(GPIO_NR_PALMTX_GPIO_RESET) + +#endif
aren't there some gpio defines to actually define these to?
Quoted 75 lines
include/asm-arm/arch-pxa/palmtx-init.h new file +69
-0@@ -0,0 +1,69 @@ +/* +* Init values for Palm T|X Handheld Computer +* +* Authors: Marek Vasut <[email protected]> +* Cristiano P. <cristianop AT users DOT sourceforge DOT net> +* Jan Herman <2hp AT seznam DOT cz> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* +* this code is in a very early stage: +* - use it at your own risk +* - any help is encouraged and will be highly appreciated +* +*/ + +#ifndef _INCLUDE_PALMTX_INIT_H_ + +#define _INCLUDE_PALMTX_INIT_H_ + +/* Various addresses */ + +#define PALMTX_PCMCIA_PHYS 0x28000000 +#define PALMTX_PCMCIA_VIRT 0xf0000000 +#define PALMTX_PCMCIA_SIZE 0x100000 + +#define PALMTX_PHYS_RAM_START 0xa0000000 +#define PALMTX_PHYS_IO_START 0x40000000 + +#define PALMTX_PHYS_FLASH_START PXA_CS0_PHYS/* ChipSelect 0 */ +#define PALMTX_PHYS_NAND_START PXA_CS1_PHYS/* ChipSelect 1 */ + +/* KEYPAD configuration */ + +#define KPASMKP (col) (col/2 == 0 ? KPASMKP0 : KPASMKP1) +#define KPASMKPx_MKC (row, col) (1 << (row + 16*(col%2))) + +#define PALMTX_KM_ROWS 4 +#define PALMTX_KM_COLS 3 + + +/* TOUCHSCREEN */ + +#define AC97_LINK_FRAME 21 + + +/* BATTERY */ + +#define PALMTX_BAT_MAX_VOLTAGE 4000/* 4.00v current voltage */ +#define PALMTX_BAT_MIN_VOLTAGE 3550/* 3.55v critical voltage */ +#define PALMTX_BAT_MAX_CURRENT 0/* unknokn */ +#define PALMTX_BAT_MIN_CURRENT 0/* unknown */ +#define PALMTX_BAT_MAX_CHARGE 1/* unknown */ +#define PALMTX_BAT_MIN_CHARGE 1/* unknown */ +#define PALMTX_MAX_LIFE_MINS 360/* on-life in minutes */ + +#define PALMTX_BAT_MEASURE_DELAY (HZ * 1) + +/* BACKLIGHT */ + +#define PALMTX_MAX_INTENSITY 0xFE +#define PALMTX_DEFAULT_INTENSITY 0x7E +#define PALMTX_LIMIT_MASK 0x7F +#define PALMTX_PRESCALER 0x3F +#define PALMTX_PERIOD 0x12C + +#endif
Signature · 3 lines
Ben ([email protected], http://www.fluff.org/) 'a smiley only costs 4 bytes'
Quoted 2 lines · Ben Dooks
hmm, why isn't the pxa sdmmc driver doing something about the detection for the cards?
Because there's no standard way to detect MMC cards on PXA hardware.
Quoted 11 lines
arch/arm/mach-pxa/palmtx.c line 129
Quoted 7 lines
arch/arm/mach-pxa/palmtx.c new file +7
-0+/****************************************************************************** +* GPIO keys +******************************************************************************/ +#ifdef CONFIG_KEYBOARD_GPIO +static struct gpio_keys_button palmtx_pxa_buttons[] = { + {KEY_F8 ,GPIO_NR_PALMTX_HOTSYNC_BUTTON_N ,1 ,"HotSync Button" }, +};I've never seen the pooint of #ifdefs for platform data, just bung the lot in, it is always possible to build and an insert a new driver module to support this after building the zImage.
And this initialiser should be using named initialisers.
Quoted 8 lines
arch/arm/mach-pxa/palmtx.c line 163
Quoted 6 lines
arch/arm/mach-pxa/palmtx.c new file +6
-0+static struct generic_bl_info palmtx_bl_info = { + .max_intensity =PALMTX_MAX_INTENSITY , + .default_intensity =PALMTX_MAX_INTENSITY , + .set_bl_intensity = palmtx_set_bl_intensity, + .limit_mask =PALMTX_LIMIT_MASK , +};go and have a look at the new pwm stuff.
It's found in the 'pxa' branch of my git tree. See the website for a link to it.
Quoted 10 lines
arch/arm/mach-pxa/palmtx.c line 185
Quoted 10 lines
arch/arm/mach-pxa/palmtx.c new file +10
-0+static void palmtx_irda_transceiver_mode (struct device *dev,int mode) +{ +unsigned long flags; + +local_irq_save (flags); + +if (mode &IR_SIRMODE ) +printk (KERN_INFO "IrDA: setting mode to SIR\n" ); +else if (mode &IR_FIRMODE ) +printk (KERN_INFO "IrDA: setting mode to FIR\n" );
Are these useful?
Quoted 3 lines
arch/arm/mach-pxa/palmtx.c line 188
Quoted 3 lines
arch/arm/mach-pxa/palmtx.c new file +3
-0+ +if (mode &IR_OFF ) { +printk (KERN_INFO "IrDA: turning transceiver OFF\n" );
Ditto.
Quoted 3 lines
arch/arm/mach-pxa/palmtx.c line 191
Quoted 3 lines
arch/arm/mach-pxa/palmtx.c new file +3
-0+gpio_set_value (GPIO_NR_PALMTX_IR_DISABLE ,1 ); + }else { +printk (KERN_INFO "IrDA: turning transceiver ON\n" );
Ditto.
Quoted 4 lines
arch/arm/mach-pxa/palmtx.c line 195
Quoted 4 lines
arch/arm/mach-pxa/palmtx.c new file +4
-0+gpio_set_value (GPIO_NR_PALMTX_IR_DISABLE ,0 ); +gpio_set_value (GPIO47_ICPTXD_MD ,1 ); +mdelay (30 ); +gpio_set_value (GPIO47_ICPTXD_MD ,0 );
Don't you have to configure GPIO47 as a GPIO to change its state? Since you don't, and I assume you've tested this, I think you've proven that you can delete the fiddling with GPIO47.
Quoted 7 lines
arch/arm/mach-pxa/palmtx.c line 212
Quoted 7 lines
arch/arm/mach-pxa/palmtx.c new file +7
-0+/****************************************************************************** +* AC97 +******************************************************************************/ +static struct platform_device palmtx_ac97 = { + .name ="pxa2xx-ac97" , + .id =0 , +};
There's an AC97 device now in the pxa branch.
ok, I fixed what I was able to grasp. That is :
-Are these useful? + Dittos
-Don't you have to configure GPIO47 as a GPIO to change its state? Since you don't, and I assume you've tested this, I think you've proven that you can delete the fiddling with GPIO47.
Actually GPIO47 was set up before by palmos (since Im not booting from clean state, but from palmOS) so it wasnt necessary to set it up again in linux and it didnt cause any problems. Booting it from clean state would cause problems, so I fixed it.
-I belive these calls are being deprecated.
-don't call set_irq_type, pass the relevant trigger flags to request_irq().
-I've never seen the pooint of #ifdefs for platform data, just bung the lot in, it is always possible to build and an insert a new driver module to support this after building the zImage.
-hmm, real email addresses are generally safe here. -aren't there some gpio defines to actually define these to?
Yea, I threw away all the remaining redefined GPIOs
That's it, but what I still dont understand is the pxa branch (and new PWM stuff). Im currently using mainline (linus's tree), so that's not the tree I should use ?
arch/arm/mach-pxa/Kconfig +13 -0
@@ -138,6 +138,19 @@ config MACH_PCM027 select PXA27x select IWMMXT +config ARCH_PXA_PALM + bool "PXA based Palm PDAs" + +config MACH_XSCALE_PALMTX + bool "Palm T|X" + default y + depends on ARCH_PXA_PALM + select PXA27x + select IWMMXT + help + Say Y here if you intend to run this kernel on a Palm T|X + handheld computer. + endchoice choice
arch/arm/mach-pxa/Makefile +1 -0
@@ -36,6 +36,7 @@ obj-$(CONFIG_MACH_TOSA) += tosa.o obj-$(CONFIG_MACH_EM_X270) += em-x270.o obj-$(CONFIG_MACH_MAGICIAN) += magician.o obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o +obj-$(CONFIG_MACH_XSCALE_PALMTX)+= palmtx.o ifeq ($(CONFIG_MACH_ZYLONITE),y) obj-y += zylonite.o
arch/arm/mach-pxa/palmtx.c new file +300 -0
300 lines not on this page · raw message
include/asm-arm/arch-pxa/palmtx-gpio.h new file +69 -0
69 lines not on this page · raw message
include/asm-arm/arch-pxa/palmtx-init.h new file +51 -0
51 lines not on this page · raw message
Quoted 11 lines · Marek Vasut
ok, I fixed what I was able to grasp. That is :
(quoted diff) +0
-2-Are these useful? + Dittos -Don't you have to configure GPIO47 as a GPIO to change its state?Since you don't, and I assume you've tested this, I think you've proven that you can delete the fiddling with GPIO47.
Actually GPIO47 was set up before by palmos (since Im not booting from clean state, but from palmOS) so it wasnt necessary to set it up again in linux and it didnt cause any problems. Booting it from clean state would cause problems, so I fixed it.
Bear in mind then that it may work for the first time you enable IrDA, but if you subseqently disable and re-enable it, GPIO47 will be assigned to the UART instead.
Quoted 3 lines
That's it, but what I still dont understand is the pxa branch (and new PWM stuff). Im currently using mainline (linus's tree), so that's not the tree I should use ?
from memory:
http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-rmk pxa
where 'http:...' is the URL and 'pxa' is the branch name. It's currently quite a bit older than mainline at the moment.
Dne Thursday 03 of July 2008 01:14:15 Russell King - ARM Linux napsal(a):
Quoted 8 lines · Marek Vasut
Quoted 7 lines
ok, I fixed what I was able to grasp. That is :
(quoted diff) +0
-2-Are these useful? + Dittos -Don't you have to configure GPIO47 as a GPIO to change its state?Since you don't, and I assume you've tested this, I think you've proven that you can delete the fiddling with GPIO47.
Quoted 8 lines
Quoted 4 lines
Actually GPIO47 was set up before by palmos (since Im not booting from clean state, but from palmOS) so it wasnt necessary to set it up again in linux and it didnt cause any problems. Booting it from clean state would cause problems, so I fixed it.
Bear in mind then that it may work for the first time you enable IrDA, but if you subseqently disable and re-enable it, GPIO47 will be assigned to the UART instead.
It works when enabled and disabled multiple times, I tested that.
Quoted 11 lines
Quoted 4 lines
That's it, but what I still dont understand is the pxa branch (and new PWM stuff). Im currently using mainline (linus's tree), so that's not the tree I should use ?
from memory:
http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-rmk pxa
where 'http:...' is the URL and 'pxa' is the branch name. It's currently quite a bit older than mainline at the moment.
Ok, so I should switch to pxa or pxa-pwm (and update the pwm) or continue working against mainline (without updating the pwm and ac97)?
Thanks
Quoted 3 lines · Marek Va??ut
the following patch adds initial support for PalmTX handheld computer. It originates from HnD kernel tree (www.hackndev.com), then I pushed it to handhelds.org and now I'd like it to be applied mainline.
There's one other thing that's missing from the patch - an entry for MAINTAINERS.
Dne Thursday 03 of July 2008 09:45:11 Russell King - ARM Linux napsal(a):
Quoted 7 lines · Marek Va??ut
Quoted 3 lines
the following patch adds initial support for PalmTX handheld computer. It originates from HnD kernel tree (www.hackndev.com), then I pushed it to handhelds.org and now I'd like it to be applied mainline.
There's one other thing that's missing from the patch - an entry for
MAINTAINERS.
Ok, I hope it's all properly fixed now. I applied pxa-pwm patch on my tree and switched to pwm-backlight and used .lcd_conn. Also added to MAINTAINERS.
MAINTAINERS +6 -0
@@ -571,6 +571,12 @@ P: Dirk Opfer M: [email protected] S: Maintained +ARM/PALMTX SUPPORT +P: Marek Vasut +M: [email protected] +W: http://www.hackndev.com +S: Maintained + ARM/PLEB SUPPORT P: Peter Chubb M: [email protected]
arch/arm/mach-pxa/palmtx.c new file +322 -0
322 lines not on this page · raw message
include/asm-arm/arch-pxa/palmtx-gpio.h new file +69 -0
69 lines not on this page · raw message
include/asm-arm/arch-pxa/palmtx-init.h new file +51 -0
51 lines not on this page · raw message
arch/arm/mach-pxa/Kconfig +14 -0
@@ -138,6 +141,20 @@ config MACH_PCM027 select PXA27x select IWMMXT +config ARCH_PXA_PALM + bool "PXA based Palm PDAs" + select HAVE_PWM + +config MACH_XSCALE_PALMTX + bool "Palm T|X" + default y + depends on ARCH_PXA_PALM + select PXA27x + select IWMMXT + help + Say Y here if you intend to run this kernel on a Palm T|X + handheld computer. + endchoice choice
arch/arm/mach-pxa/Makefile +1 -0
@@ -36,6 +37,7 @@ obj-$(CONFIG_MACH_TOSA) += tosa.o obj-$(CONFIG_MACH_EM_X270) += em-x270.o obj-$(CONFIG_MACH_MAGICIAN) += magician.o obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o +obj-$(CONFIG_MACH_XSCALE_PALMTX)+= palmtx.o ifeq ($(CONFIG_MACH_ZYLONITE),y) obj-y += zylonite.o
Quoted 11 lines · Marek Vasut
Dne Thursday 03 of July 2008 09:45:11 Russell King - ARM Linux napsal(a):
Quoted 7 lines · Marek Va??ut
Quoted 3 lines
the following patch adds initial support for PalmTX handheld computer. It originates from HnD kernel tree (www.hackndev.com), then I pushed it to handhelds.org and now I'd like it to be applied mainline.
There's one other thing that's missing from the patch - an entry for
MAINTAINERS.Ok, I hope it's all properly fixed now. I applied pxa-pwm patch on my tree and switched to pwm-backlight and used .lcd_conn. Also added to
MAINTAINERS.
I'm getting a headache trying to work out where all this stuff should go.
Right, when you were asked to use the pxa-pwm branch, that was right at the time. However, Dmitry Baryshkov recently submitted and I accepted a patch which sorts out the IrDA support, and your patch misses out on that change.
So the right place has changed from the pxa-pwm branch to the pxa branch itself. Could you regenerate please?
For the IrDA changes, see 5146/1.
Dne Thursday 03 of July 2008 19:01:28 Russell King - ARM Linux napsal(a):
Quoted 23 lines · Marek Vasut
Quoted 7 lines
Dne Thursday 03 of July 2008 09:45:11 Russell King - ARM Linux napsal(a):
Quoted 6 lines · Marek Va??ut
Quoted 4 lines
the following patch adds initial support for PalmTX handheld computer. It originates from HnD kernel tree (www.hackndev.com), then I pushed it to handhelds.org and now I'd like it to be applied mainline.
Quoted 6 lines
Quoted 2 lines
There's one other thing that's missing from the patch - an entry for
MAINTAINERS.Ok, I hope it's all properly fixed now. I applied pxa-pwm patch on my tree and switched to pwm-backlight and used .lcd_conn. Also added to
MAINTAINERS.I'm getting a headache trying to work out where all this stuff should go.
Right, when you were asked to use the pxa-pwm branch, that was right at the time. However, Dmitry Baryshkov recently submitted and I accepted a patch which sorts out the IrDA support, and your patch misses out on that change.
Quoted 4 lines
So the right place has changed from the pxa-pwm branch to the pxa branch itself. Could you regenerate please?
For the IrDA changes, see 5146/1.
ok, I regenerated against devel branch and added the IrDA change.
MAINTAINERS +6 -0
@@ -577,6 +577,12 @@ P: Dirk Opfer M: [email protected] S: Maintained +ARM/PALMTX SUPPORT +P: Marek Vasut +M: [email protected] +W: http://www.hackndev.com +S: Maintained + ARM/PLEB SUPPORT P: Peter Chubb M: [email protected]
arch/arm/mach-pxa/Kconfig +14 -0
@@ -198,6 +198,20 @@ config MACH_PCM027 select IWMMXT select PXA_SSP +config ARCH_PXA_PALM + bool "PXA based Palm PDAs" + select HAVE_PWM + +config MACH_XSCALE_PALMTX + bool "Palm T|X" + default y + depends on ARCH_PXA_PALM + select PXA27x + select IWMMXT + help + Say Y here if you intend to run this kernel on a Palm T|X + handheld computer. + config MACH_PCM990_BASEBOARD bool "PHYTEC PCM-990 development board" select HAVE_PWM
arch/arm/mach-pxa/Makefile +1 -0
@@ -37,6 +37,7 @@ obj-$(CONFIG_MACH_TOSA) += tosa.o obj-$(CONFIG_MACH_EM_X270) += em-x270.o obj-$(CONFIG_MACH_MAGICIAN) += magician.o obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o +obj-$(CONFIG_MACH_XSCALE_PALMTX)+= palmtx.o ifeq ($(CONFIG_MACH_ZYLONITE),y) obj-y += zylonite.o
arch/arm/mach-pxa/palmtx.c new file +323 -0
323 lines not on this page · raw message
include/asm-arm/arch-pxa/palmtx-gpio.h new file +69 -0
69 lines not on this page · raw message
include/asm-arm/arch-pxa/palmtx-init.h new file +51 -0
51 lines not on this page · raw message
Quoted 11 lines · Marek Vašut
Hi,
the following patch adds initial support for PalmTX handheld computer. It originates from HnD kernel tree (www.hackndev.com), then I pushed it to handhelds.org and now I'd like it to be applied mainline.PalmTX is pxa27x based handheld computer.
Currently supported - mmc, gpio keys, pxa matrix keypad, irda, framebuffer, ac97 port (for touchscreen).
Signed-off-by Marek Vasut <[email protected]>
Please consider switching ac97 driver to ASoC-based one.
Signature · 2 lines
With best wishes Dmitry
Quoted 1 line · Dmitry Baryshkov
Please consider switching ac97 driver to ASoC-based one.
There was another patch posted with an ASoC machine driver so I guess this is covered :) . Registering the AC97 platform device is still useful for platforms using ASoC - it doesn't hurt at the minute and when the ASoC v2 changes allowing different components to load separately it will be used to load the ASoC AC97 controller driver.