From 8b8842bfcb95b0e2c1f654be1e8c42f7fe02c21a Mon Sep 17 00:00:00 2001 From: Mike Dunn Date: Thu, 27 Dec 2012 10:02:19 -0800 Subject: ARM: palmtreo: add docg4 device initialization This patch adds initialization of the docg4 nand flash device to the treo680. Signed-off-by: Mike Dunn Reviewed-by: Marek Vasut Acked-by: Tomas Cech Signed-off-by: Haojian Zhuang --- arch/arm/mach-pxa/palmtreo.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'arch/arm/mach-pxa') diff --git a/arch/arm/mach-pxa/palmtreo.c b/arch/arm/mach-pxa/palmtreo.c index 3f3c48f2f7ce..515343506821 100644 --- a/arch/arm/mach-pxa/palmtreo.c +++ b/arch/arm/mach-pxa/palmtreo.c @@ -395,6 +395,36 @@ static void __init palmtreo_leds_init(void) static inline void palmtreo_leds_init(void) {} #endif +/****************************************************************************** + * diskonchip docg4 flash + ******************************************************************************/ +#if defined(CONFIG_MACH_TREO680) +/* REVISIT: does the centro have this device also? */ +#if IS_ENABLED(CONFIG_MTD_NAND_DOCG4) +static struct resource docg4_resources[] = { + { + .start = 0x00000000, + .end = 0x00001FFF, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device treo680_docg4_flash = { + .name = "docg4", + .id = -1, + .resource = docg4_resources, + .num_resources = ARRAY_SIZE(docg4_resources), +}; + +static void __init treo680_docg4_flash_init(void) +{ + platform_device_register(&treo680_docg4_flash); +} +#else +static inline void treo680_docg4_flash_init(void) {} +#endif +#endif + /****************************************************************************** * Machine init ******************************************************************************/ @@ -430,6 +460,7 @@ static void __init treo680_init(void) palmphone_common_init(); palm27x_mmc_init(GPIO_NR_TREO_SD_DETECT_N, GPIO_NR_TREO680_SD_READONLY, GPIO_NR_TREO680_SD_POWER, 0); + treo680_docg4_flash_init(); } #endif -- cgit v1.2.3 From 747f3449f311289b5d08e9337241c671214ae11a Mon Sep 17 00:00:00 2001 From: Mike Dunn Date: Thu, 27 Dec 2012 10:02:20 -0800 Subject: ARM: palmtreo: replace #if defined with IF_ENABLED Use IF_ENABLED macro from kconfig.h. Thanks Sergei. Signed-off-by: Mike Dunn Acked-by: Tomas Cech Signed-off-by: Haojian Zhuang --- arch/arm/mach-pxa/palmtreo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/arm/mach-pxa') diff --git a/arch/arm/mach-pxa/palmtreo.c b/arch/arm/mach-pxa/palmtreo.c index 515343506821..c181a60a23f4 100644 --- a/arch/arm/mach-pxa/palmtreo.c +++ b/arch/arm/mach-pxa/palmtreo.c @@ -161,7 +161,7 @@ static unsigned long centro685_pin_config[] __initdata = { /****************************************************************************** * GPIO keyboard ******************************************************************************/ -#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE) +#if IS_ENABLED(CONFIG_KEYBOARD_PXA27x) static unsigned int treo680_matrix_keys[] = { KEY(0, 0, KEY_F8), /* Red/Off/Power */ KEY(0, 1, KEY_LEFT), @@ -309,7 +309,7 @@ static inline void palmtreo_kpc_init(void) {} /****************************************************************************** * USB host ******************************************************************************/ -#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) +#if IS_ENABLED(CONFIG_USB_OHCI_HCD) static struct pxaohci_platform_data treo680_ohci_info = { .port_mode = PMM_PERPORT_MODE, .flags = ENABLE_PORT1 | ENABLE_PORT3, -- cgit v1.2.3 From 495b21dc0e488b784ab1d4007d00db1ca2a95c98 Mon Sep 17 00:00:00 2001 From: Andrea Adami Date: Sat, 24 Nov 2012 00:12:08 +0100 Subject: ARM: pxa: pxa27x.c: add dummy SA1100 rtc clock Using pxa27x you could now build both RTC_DRV_PXA and RTC_DRV_SA1100. Make sure you don't use both together: link /dev/rtc0 or /dev/rtc1 to /dev/rtc according to your requirement. Signed-off-by: Andrea Adami Acked-by: Robert Jarzmik Signed-off-by: Haojian Zhuang --- arch/arm/mach-pxa/pxa27x.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/mach-pxa') diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 616cb87b6179..07f1bdb9cd8e 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c @@ -230,6 +230,7 @@ static struct clk_lookup pxa27x_clkregs[] = { INIT_CLKREG(&clk_pxa27x_memc, NULL, "MEMCLK"), INIT_CLKREG(&clk_pxa27x_mem, "pxa2xx-pcmcia", NULL), INIT_CLKREG(&clk_dummy, "pxa-gpio", NULL), + INIT_CLKREG(&clk_dummy, "sa1100-rtc", NULL), }; #ifdef CONFIG_PM -- cgit v1.2.3